Skip to content

fix: include response status and body in every fetch error

Tomas Vik requested to merge 559-more-detailed-fetch-errors into main

This MR improves our error reporting by attaching a response body to a FetchError so users can see the API response in the logs when the API request fails.

This MR also makes sure that child error details are included in the UserFriendlyError details. So for example when we log logError(new UserFriendlyError('User message', new FetchError('message', response))) the details from FetchError are also included.

Related to #559 (closed)

Edited by Tomas Vik

Merge request reports