1 |
class FetchError extends Error { |
|
2 |
constructor (resp, body) { |
|
3 |
super(resp.statusText)
|
2✔ |
4 |
this.name = 'FetchError' |
2✔ |
5 |
this.resp = resp
|
2✔ |
6 |
this.status = resp.status
|
2✔ |
7 |
Object.assign(this, body)
|
2✔ |
8 |
} |
2✔ |
9 |
} |
1✔ |
10 |
|
1✔ |
11 |
export {
|
1✔ |
12 |
FetchError |
1✔ |
13 |
} |
1✔ |