forked from boschglobal/oss-review-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(osv-client): Improve error messages
Decode the dedicated error body in case of unsuccessful responses, and fall back to a message that includes the HTTP code otherwise. Signed-off-by: Sebastian Schuberth <[email protected]>
- Loading branch information
1 parent
0726d0f
commit 1f08feb
Showing
2 changed files
with
14 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,3 +180,9 @@ data class Severity( | |
CVSS_V3 | ||
} | ||
} | ||
|
||
@Serializable | ||
data class ErrorResponse( | ||
val code: Int, | ||
val message: String | ||
) |
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