Skip to content

fix: include response status and body in every fetch error

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 (OOO back on 2024-07-02)

Merge request reports