Skip to content

Commit

Permalink
fix(query): remove Promise from error type in query clients (orval-…
Browse files Browse the repository at this point in the history
  • Loading branch information
soartec-lab authored Aug 11, 2024
1 parent 40fc4c6 commit d689408
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/query/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,9 @@ export const getQueryErrorType = (
}>`
: response.definition.errors || 'unknown';
} else {
const errorType =
httpClient === OutputHttpClient.AXIOS ? 'AxiosError' : 'Promise';

return `${errorType}<${response.definition.errors || 'unknown'}>`;
return httpClient === OutputHttpClient.AXIOS
? `AxiosError<${response.definition.errors || 'unknown'}>`
: `${response.definition.errors || 'unknown'}`;
}
};

Expand Down

0 comments on commit d689408

Please sign in to comment.