interledger / rafiki

An open-source, comprehensive Interledger service for wallet providers, enabling them to provide Interledger functionality to their users.
https://rafiki.dev/
Apache License 2.0
233 stars 83 forks source link

chore(auth): return objects during GNAP errors #2779

Closed mkurapov closed 3 months ago

mkurapov commented 3 months ago

Changes proposed in this pull request

Updates how errors are displayed when making requests to the AS, to be more in-line with the spec. This improves error handling in general as it allows for parsing error codes, and making use of the description.

Before: Screenshot 2024-06-21 at 20 01 08

After: Screenshot 2024-06-21 at 20 00 43

This PR also adds some if-checks to the OP post requests scripts in bruno, in order not to prevent any errors from being hidden, since when post requests scripts would fail to parse response body information, the script error would override the actual response error.

Context

General OP error handling #1905

Checklist

netlify[bot] commented 3 months ago

Deploy Preview for brilliant-pasca-3e80ec canceled.

Name Link
Latest commit 4464dd1e6b38e6840964136c692e576418e25b05
Latest deploy log https://app.netlify.com/sites/brilliant-pasca-3e80ec/deploys/6675c81e9265c50008119dfc