You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happens now is that the underlying HTTP error (404, 500, etc) gets buried by a JSON parsing error like SyntaxError: Unexpected token < in JSON at position 0, at least in the case of f=json.
It seems to me that we need a
response.ok
check before thisswitch
:arcgis-rest-js/packages/arcgis-rest-request/src/request.ts
Lines 175 to 190 in f12822c
The same way ember-arcgis-portal-services does here:
https://github.com/Esri/ember-arcgis-portal-services/blob/master/addon/mixins/service-mixin.js#L90-L108
What happens now is that the underlying HTTP error (404, 500, etc) gets buried by a JSON parsing error like
SyntaxError: Unexpected token < in JSON at position 0
, at least in the case off=json
.See the first error on https://esri.github.io/ember-cli-cedar/#/error-handling as an example.
If y'all agree, I can PR the logic from ember-arcgis-portal-services.
The text was updated successfully, but these errors were encountered: