-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
fixing the errors flow. fixing documentation.
fixing documentation.
src/shaka-offline-provider.js
Outdated
}) | ||
} | ||
|
||
_getErrorData(error: any): any { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not used? remove it
src/shaka-offline-provider.js
Outdated
}).catch((error) => { | ||
reject(new Error(Error.Severity.RECOVERABLE, Error.Category.STORAGE, Error.Code.DOWNLOAD_ABORTED, error)); | ||
}); | ||
}).catch(error => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix indentation
src/offline-manager.js
Outdated
}).catch((error) => { | ||
this._onError(new Error(Error.Severity.RECOVERABLE, Error.Category.STORAGE, Error.Code.REMOVE_REJECTED, error)); | ||
}); | ||
}).catch(error => this._onError(error)); |
There was a problem hiding this comment.
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)
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.