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

feat(FEC-8391): checking if the quota exceeded error #9

Merged
merged 8 commits into from
Jul 19, 2018
Merged

Conversation

odedhutzler
Copy link
Contributor

@odedhutzler odedhutzler commented Jul 9, 2018

checking if the error thrown (by the indexeddb handler or by shaka ) is because the quota of the db exceeded (no more free storage).

also refactored the errors. it was a bit of a mess.

@odedhutzler odedhutzler self-assigned this Jul 9, 2018
@odedhutzler odedhutzler requested review from OrenMe, yairans and dan-ziv July 9, 2018 15:00
fixing the errors flow.

fixing documentation.
fixing documentation.
})
}

_getErrorData(error: any): any {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not used? remove it

}).catch((error) => {
reject(new Error(Error.Severity.RECOVERABLE, Error.Category.STORAGE, Error.Code.DOWNLOAD_ABORTED, error));
});
}).catch(error =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentation

}).catch((error) => {
this._onError(new Error(Error.Severity.RECOVERABLE, Error.Category.STORAGE, Error.Code.REMOVE_REJECTED, error));
});
}).catch(error => this._onError(error));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you return the inner promises can you just use catch on the outer most promise?

when there the index db cannot find the requested item - it returns an empty response and not rejects.

it rejects only upon an error (e.g. when the key is an object instead of a string/int)
@odedhutzler odedhutzler merged commit edf0dd3 into master Jul 19, 2018
@odedhutzler odedhutzler deleted the FEC-8391 branch July 19, 2018 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants