Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Failed to parse JSON (description, state, changes_count) #580

Open
Ph1Doc opened this issue Mar 28, 2023 · 0 comments
Open

ERROR: Failed to parse JSON (description, state, changes_count) #580

Ph1Doc opened this issue Mar 28, 2023 · 0 comments

Comments

@Ph1Doc
Copy link

Ph1Doc commented Mar 28, 2023

Hello

we started using Danger-swift on Gitlab and met a number of problems when parse JSON

  • description
    ERROR: Failed to parse JSON: valueNotFound(Swift.String, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "danger", intValue: nil), CodingKeys(stringValue: "gitlab", intValue: nil), CodingKeys(stringValue: "mr", intValue: nil), CodingKeys(stringValue: "description", intValue: nil)], debugDescription: "Expected String value but found null instead.", underlyingError: nil))

  • state
    ERROR: Failed to parse JSON: dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "danger", intValue: nil), CodingKeys(stringValue: "gitlab", intValue: nil), CodingKeys(stringValue: "mr", intValue: nil), CodingKeys(stringValue: "author", intValue: nil), CodingKeys(stringValue: "state", intValue: nil)], debugDescription: "Cannot initialize State from invalid String value ldap_blocked", underlyingError: nil))

  • changes_count
    ERROR: Failed to parse JSON: valueNotFound(Swift.String, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "danger", intValue: nil), CodingKeys(stringValue: "gitlab", intValue: nil), CodingKeys(stringValue: "mr", intValue: nil), CodingKeys(stringValue: "changes_count", intValue: nil)], debugDescription: "Expected String value but found null instead.", underlyingError: nil))
    https://docs.gitlab.com/ee/api/merge_requests.html#empty-api-fields-for-new-merge-requests

Can you make these parameters Optional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant