Skip to content

Commit

Permalink
handle token expiry error
Browse files Browse the repository at this point in the history
  • Loading branch information
Bahugunajii committed Dec 21, 2023
1 parent fd30254 commit 344a500
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export async function verifyToken() {
});

return { isValid: true, data: response.data };
} catch (error) {
if (error && refreshToken) {
} catch (error: any) {
if (error.response.data.detail === "Signature has expired" && refreshToken) {
try {
const refreshResponse = await axios.post(refreshUrl, {}, {
headers: {
Expand Down

0 comments on commit 344a500

Please sign in to comment.