Errors do not cause rejection, as documented #27

Closed
opened 2020-10-06 17:37:51 +08:00 by pimterry · 1 comment
pimterry commented 2020-10-06 17:37:51 +08:00 (Migrated from github.com)

The docs say:

If any errors exist(from query response), will reject the promise.

The code for this is here: gucheen/fetchql@07d08bef9b/src/index.js (L184-L199)

In reality, the promise is only rejected if no data is returned. If data is returned and errors exist, the promise will resolve successfully with the data, ignoring the errors.

The docs say: > If any errors exist(from query response), will reject the promise. The code for this is here: https://github.com/gucheen/fetchql/blob/07d08bef9b153929fdf3d8ea2d8a0e9faf3e245e/src/index.js#L184-L199 In reality, the promise is only rejected if no data is returned. If data is returned and errors exist, the promise will resolve successfully with the data, ignoring the errors.
gucheen commented 2020-10-07 08:49:38 +08:00 (Migrated from github.com)

Thanks, I've fixed the document

Thanks, I've fixed the document
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gucheen/fetchql#27
No description provided.