mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
fixes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
function ApiService(tokenService) {
|
||||
function ApiService(tokenService) {
|
||||
this.baseUrl = 'https://api.bitwarden.com';
|
||||
this.tokenService = tokenService;
|
||||
|
||||
@@ -269,6 +269,11 @@ function initApiService() {
|
||||
// Helpers
|
||||
|
||||
function handleError(errorCallback, jqXHR, textStatus, errorThrown) {
|
||||
if (jqXHR.status === 401 || jqXHR.status === 403) {
|
||||
chrome.runtime.sendMessage(null, { command: 'logout' });
|
||||
return;
|
||||
}
|
||||
|
||||
errorCallback(new ErrorResponse(jqXHR));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user