Skip to content

Commit

Permalink
fix: handle invalid JWT error properly
Browse files Browse the repository at this point in the history
  • Loading branch information
inian committed Mar 18, 2021
1 parent e7cb2fb commit 0ed30a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export function transformPostgrestError(
code = '404'
message = 'The resource was not found'
type = 'Not found'
} else if (responseStatus === 401) {
code = '401'
type = 'Invalid JWT'
} else {
console.log(error, responseStatus)
}
Expand Down

0 comments on commit 0ed30a6

Please # to comment.