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

feat: Expose structured API response errors #531

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nieomylnieja
Copy link
Collaborator

@nieomylnieja nieomylnieja commented Aug 30, 2024

Motivation

sdk.Client methods which interact with Nobl9 API currently return only generic text based errors.
This obstructs the relevant details from the user. Furthermore, the current default text format for these errors is fairly poor and doesn't contain details like endpoint path.

Summary

  • Added sdk.APIError which is a structured error that contains all the relevant API error details as well as produces an improved (over the previous state) text representation.
  • Improved docs.
  • Removed PlantUML in favour of Mermaid, since it's much easier to use as it doesn't require Java and renders natively in Markdown.

Testing

Covered by both unit and end-to-end tests.

Release Notes

sdk.Client API calls now can return sdk.APIError, which is a structured error providing details of the error returned by Nobl9's API.

@nieomylnieja nieomylnieja changed the title feat: Expose structured HTTP response errors feat: Expose structured API response errors Aug 30, 2024
@n9-machine-user n9-machine-user added enhancement New feature or request go minor labels Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants