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

dest api: Clean up error API #3698

Merged
merged 8 commits into from
Feb 21, 2024
Merged

Conversation

mastercactapus
Copy link
Member

@mastercactapus mastercactapus commented Feb 20, 2024

Description:
This PR adds known error codes to the schema, and switches the errutil functions from returning mapped types, to just filtering gql errors directly (meaning, instead of returning yet another structure, components will handle the graphql error objects directly).

  • errorcodes.graphqls contains the enum of all defined error codes
  • errortypes.ts has functions for identifying errors and type definitions for guaranteed fields
  • special case for destination type is removed (it is now just a normal field error)
  • errors.d.ts is no longer needed as the errorcodes enum is now part of the schema

Which issue(s) this PR fixes:
Part of #2639

Screenshots
image

allending313
allending313 previously approved these changes Feb 20, 2024
@mastercactapus mastercactapus merged commit e6633a4 into master Feb 21, 2024
7 checks passed
@mastercactapus mastercactapus deleted the dest-err-response-updates branch February 21, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants