Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Nov 19, 2024
1 parent 120c9a7 commit c5d06cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/meteor/app/api/server/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,11 +719,13 @@ export class APIClass<TBasePath extends string = ''> extends Restivus {
switch (e.error) {
case 'error-too-many-requests':
return API.v1.tooManyRequests(typeof e === 'string' ? e : e.message);
case 'unauthorized':
case 'error-unauthorized':
if (applyBreakingChanges) {
return API.v1.unauthorized(typeof e === 'string' ? e : e.message);
}
return API.v1.forbidden(typeof e === 'string' ? e : e.message);
case 'forbidden':
case 'error-forbidden':
if (applyBreakingChanges) {
return API.v1.forbidden(typeof e === 'string' ? e : e.message);
Expand Down

0 comments on commit c5d06cd

Please sign in to comment.