data-provider/core

Can't manage full error object

Closed this issue · 2 comments

Describe the bug
When having an error response, such as 400, 401 or 500, the error received in the catch, or in the component, has only the response body.

To Reproduce
In this selector for example

export const mySuperSelector = new Selector(
  {
    source: myAwesomeOrigin,
    query: query => query,
    catch: e => {
	  // e is only response body error, and you can't access to status or other properties
      return false;
    }
  },
  data => data,
  false
);

Expected behavior
You should be able to access full response error object.

This issue was originally created at XbyOrange/mercury-api#17. That project seems to be no longer maintained, so it should be fixed in this one.

Closed due to project discontinuation