We're excited to introduce a significant update in how we handle errors in our GraphQL API! This change aims to enhance the development experience by providing a clearer and more consistent framework for dealing with error scenarios.
What Changed
- Introduction of the "extensions" Key: Now, each error object in the "errors" array features an additional key called "extensions". This addition allows for including extra information about the error, beyond the basic data like "message", "locations", and "path".
- Standardization of the "code" Field: Within the "extensions" key, we've implemented the "code" field. This field provides a standardized error code for each type of error, making it easier to identify and handle encountered issues.
- New "correlation_id" Field: In addition to the error code, we've added the "correlation_id" field within "extensions". This unique correlation identifier aids in tracking and diagnosing problems.
Why It Matters:
Clarity and Consistency: The new format offers a clearer and more consistent structure for error handling, making it easier for developers to understand and troubleshoot issues.
Ease of Error Identification: With the standardization of the "code" field, developers can efficiently identify and handle different types of errors.
Improved Tracking and Diagnostics: The "correlation_id" field provides a unique way to track and diagnose problems.
We're confident that these enhancements will make the development experience with our GraphQL API even smoother and more efficient.
If you have any questions or need further information on how to adapt to these changes, feel free to consult our updated documentation or or leave a comment on this post. We're here to assist you!