chore: bypass interceptors for unauthorized errors for few auth related endpoints (#6351)
This commit is contained in:
parent
bb71e60fcb
commit
71ebe5ca36
3 changed files with 8 additions and 4 deletions
|
|
@ -22,9 +22,10 @@ export class UserService extends APIService {
|
|||
* Retrieves the current instance admin details
|
||||
* @returns {Promise<IUser>} Promise resolving to the current instance admin details
|
||||
* @throws {Error} If the API request fails
|
||||
* @remarks This method uses the validateStatus: null option to bypass interceptors for unauthorized errors.
|
||||
*/
|
||||
async adminDetails(): Promise<IUser> {
|
||||
return this.get("/api/instances/admins/me/")
|
||||
return this.get("/api/instances/admins/me/", { validateStatus: null })
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
throw error?.response?.data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue