Skip to content

Commit

Permalink
Fixed Insufficient permissions ("unauthorized") bug (#8004)
Browse files Browse the repository at this point in the history
* Fixed Insufficient permmisions bug

* Update webui/src/lib/api/index.js

Co-authored-by: Ariel Shaqed (Scolnicov) <[email protected]>

* with correct message

---------

Co-authored-by: Ariel Shaqed (Scolnicov) <[email protected]>
  • Loading branch information
ItamarYuran and arielshaqed authored Aug 5, 2024
1 parent d40b90b commit 873c59d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webui/src/lib/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const apiRequest = async (uri, requestData = {}, additionalHeaders = {}) => {
cache.delete('user');
throw new AuthenticationError('Authentication Error', response.status);
}
throw new AuthorizationError(errorMessage, response.status);
throw new AuthorizationError(errorMessage || 'Unauthorized', response.status);
}

return response;
Expand Down

0 comments on commit 873c59d

Please sign in to comment.