UNPKG
wabac
Version:
latest (0.1.1)
0.1.1
0.1.0
A versioned cache backed by cloud storage
github.com/paulmelnikow/wabac
paulmelnikow/wabac
wabac
/
src
/
api-errors.js
16 lines
(13 loc)
•
288 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'use strict'
function
isErrorReason
(
e, reason
) {
if
(e.
errors
===
undefined
) {
// Handle download errors.
return
e.
reason
}
else
{
// Handle most other errors.
return
e.
errors
.
length
===
1
&& e.
errors
[
0
].
reason
=== reason } }
module
.
exports
= { isErrorReason, }