We know there could be a 401 response so we handle it
This commit is contained in:
@@ -116,6 +116,11 @@ class TMDB {
|
|||||||
status: 404,
|
status: 404,
|
||||||
message: error.response.body.status_message
|
message: error.response.body.status_message
|
||||||
}
|
}
|
||||||
|
} else if (error.status === 401) {
|
||||||
|
throw {
|
||||||
|
status: 401,
|
||||||
|
message: error.response.body.status_message
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw {
|
throw {
|
||||||
|
|||||||
Reference in New Issue
Block a user