Skip to content

Commit

Permalink
fix: Fix STORAGE_LIMIT_REACHED error masked by DOWNLOAD_SIZE_CALLBACK…
Browse files Browse the repository at this point in the history
…_ERROR (shaka-project#3396)
  • Loading branch information
Álvaro Velad Galván authored May 10, 2021
1 parent f3ef38b commit 69c310c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/offline/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ shaka.offline.Storage = class {
shaka.util.Error.Code.STORAGE_LIMIT_REACHED);
}
} catch (e) {
// It is necessary to be able to catch the STORAGE_LIMIT_REACHED error
if (e instanceof shaka.util.Error) {
throw e;
}
shaka.log.warning(
'downloadSizeCallback has produced an unexpected error', e);
throw new shaka.util.Error(
Expand Down

0 comments on commit 69c310c

Please sign in to comment.