Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add
accept: application/json
header to remote signer requests …
…and improve invalid response handling (#6587) * fix: handle remote signer non "application/json" response content type * restrict logger to minimal set and remove cast * Fix typo - `minamal`; refactor/inline response handling functions; remove error logging and improve exception messaging for res != OK; fix content type parsing and handling of invalid content types; * fix: exception message text * Removed logger in externalSignerClient; Improved handling of response media types; * fix: use response statusText as error message if response body is empty (response error) * fix: exception message text proper epmpty string check * fix: exception message text proper epmpty string check * fix: lint errors * reintroduce handleExternalSignerResponse generic function with better error handling; add accept header to all requests; * fix: remove forgotten check in externalSignerUpCheck function * Simplify checking response media type * Include json parse error message in thrown Error * Remove unnecessary string cast of err body * Fix json parsing * More robust error handling * Formatting * Simplify err body message parser * Revert error handling changes --------- Co-authored-by: Nico Flaig <[email protected]>
- Loading branch information