You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a29d132
Browse filesBrowse the repository at this point in the historyBrowse files
* Expose a typed error on Result
Step 2 of #6. Koios is served by PostgREST, which reports failures as a
JSON object:
{"code":"42703","details":null,"hint":null,
"message":"column record.no_such_column does not exist"}
Callers only ever saw that as an opaque String on Result.response and had
to parse it themselves.
Adds KoiosError (code, message, details, hint) and a Result.error field
populated when a failing response carries a body of that shape. The
existing response String is untouched, so no current caller changes
behaviour - Result.error is simply null where it used to be unavailable.
Bodies that are not JSON of that shape, such as a plain-text 500, leave
error null rather than guessing. Only the two sites where the body
genuinely comes from the server parse it; the synthetic failures built
locally do not pretend to carry a server error.
Verified against live mainnet: a real 42703 parses to
KoiosError(code=42703, message=column record.no_such_column does not
exist, details=null, hint=null).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Fix javadoc references to Lombok-generated getters
KoiosError referenced Result#getError() and Result#getResponse(), which
Lombok generates at compile time and javadoc therefore cannot resolve:
KoiosError.java:14: error: reference not found
That failed the CodeQL build, which runs the full javadoc. References the
fields instead.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: dudiedri <dudi.edri@ox.security>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments