-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Expose structured API response errors (#531)
## 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.
- Loading branch information
1 parent
621dce5
commit 45a5c1c
Showing
18 changed files
with
407 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,7 @@ words: | |
- generify | ||
- gobin | ||
- gofile | ||
- gofmt | ||
- goimports | ||
- golangci | ||
- gomnd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Contributing to nobl9-go | ||
|
||
If you're here, chances are you want to contribute ;) | ||
Thanks a lot for that! | ||
|
||
Your pull request will be reviewed by one of the maintainers. | ||
We encourage and welcome any and all feedback. | ||
|
||
## Before you contribute | ||
|
||
The goal of this project is to provide a feature-rich and easy-to-use | ||
Golang SDK for Nobl9 platform. | ||
|
||
Make sure you're familiarized with | ||
[development instructions](./DEVELOPMENT.md). | ||
|
||
## Making a pull request | ||
|
||
Please make a fork of this repo and submit a PR from there. | ||
More information can be found | ||
[here](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request). | ||
|
||
## Merge Request title | ||
|
||
Try to be as descriptive as you can in your PR title. | ||
Note that the title must adhere to the rules defined in | ||
[this workflow](./.github/workflows/pr-title.yml). | ||
|
||
## License | ||
|
||
Nobl9-go is licensed under Mozilla Public License Version 2.0, see [LICENSE](../LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.