Skip to content

Commit

Permalink
fix: error throwing
Browse files Browse the repository at this point in the history
  • Loading branch information
Intevel committed Jun 7, 2023
1 parent 38c2996 commit 26a8b0a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/runtime/composables/useDirectus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const useDirectus = () => {
): Promise<T> => {
const headers: HeadersInit = {}

await checkAutoRefresh();
await checkAutoRefresh()

if (token?.value && !token_expired.value) {
headers.Authorization = `Bearer ${token.value}`
Expand Down Expand Up @@ -46,7 +46,8 @@ export const useDirectus = () => {
}
throw createError({
statusCode: err.response?.status,
statusMessage: err.response?._data
statusMessage: err.response?.statusText,
data: err.response?._data
})
}
}
Expand Down

0 comments on commit 26a8b0a

Please sign in to comment.