|
return resp.json().then(data => { |
I'm attempting to use the component for an asynchronous REST service, where the /status endpoint will respond with 202 and an empty response body until the service eventually succeeds.
However, since the response function evaluates Body.json(), I'm suspecting the polling stops on an unhandled error. Perhaps the function should guard with a test for non-empty body before evaluating Body.json()?
react-polling/src/ReactPolling.js
Line 127 in 6a807c2
I'm attempting to use the component for an asynchronous REST service, where the
/statusendpoint will respond with202and an empty response body until the service eventually succeeds.However, since the response function evaluates
Body.json(), I'm suspecting the polling stops on an unhandled error. Perhaps the function should guard with a test for non-empty body before evaluatingBody.json()?