Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SourceCache checks status 404 but status code not sent in postMessage #5574

Closed
deanm opened this issue Nov 1, 2017 · 1 comment
Closed
Labels

Comments

@deanm
Copy link

deanm commented Nov 1, 2017

When one of the web workers makes an AJAX request that fails, it will throw an AJAXError (with status: Number) back to the callback. Ex:

tile.workerID = this.dispatcher.send('loadTile', params, done.bind(this));

However, when this goes through the actor, this AJAXError is simply converted to a string for the message posted back to the main thread:

error: err ? String(err) : null,

It looks like _tileLoaded however is specifically trying to handle the condition for 404:

However the err object will have just been a generic Error recreated from the string:

callback(new Error(data.error));

So it seems like there is some logic to handle 404 errors specially, however as the network fetches are usually done by the source workers, the status code doesn't make it back to that code.

@mollymerp
Copy link
Contributor

fixed in #6126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants