EN в Twitter EN В Контакте EN в Facebook
RSS 2.0
Домен: http://infinity.en.cx/ (владелец домена: Pilot infinitу) Спрятать аватары
Модераторы форума: хЫшка, Pilot infinitу, АриNа, Шаман infinity, Крoл

Better error handling for Apollo

08.11.2017 15:48:13 / 1 сообщение / автор темы JoeClark .

Рядовой
[ 08.11.2017 15:48:11 (UTC +5) ]  
Hello,

By default, all Apollo networkInterface (old) and Apollo Link (new) implementations treat all responses with status code 200 as succeeded, going into the .then(…) branch, not the error(…) branch. However, Graphcool always returns 200, even with a ‘fatal’ error.

Based on the list of error codes1, I would like to determine which ones are considered fatal and which ones are not.

For example, an insufficient permissions error might still return data, while a query syntax error will not.

If anyone has experience with this,

please share!!!


I didn't find the right solution from the Internet.
References
https://www.graph.cool/forum/t/better-error-handling-for-apollo/1081

Animated Graphic
20.04.2024 15:46:52
(UTC +5)

www.en.cx
EncounterTM Ltd.
2004-2024 ©