1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

logout on token error only if its a 400

This commit is contained in:
Kyle Spearrin 2017-02-10 19:21:18 -05:00
parent dc62c24aad
commit a9be800f9e

View File

@ -324,7 +324,7 @@ function initApiService() {
// Helpers
function handleError(errorCallback, jqXHR, tokenError, self) {
if (tokenError || jqXHR.status === 401 || jqXHR.status === 403) {
if ((tokenError && jqXHR.status === 400) || jqXHR.status === 401 || jqXHR.status === 403) {
if (self && self.logoutCallback) {
self.logoutCallback(true, function () { })
}