We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c874650 commit bdc1c29Copy full SHA for bdc1c29
api/src/errors.ts
@@ -6,6 +6,7 @@ import { FetchError, ResponseError } from 'auth0';
6
import { CustomError } from '@httptoolkit/util';
7
8
import log from 'loglevel';
9
+import { getCorsResponseHeaders } from './cors';
10
11
log.setLevel(process.env.LOGLEVEL as any ?? 'info');
12
@@ -178,7 +179,10 @@ export function catchErrors(handler: ApiHandler): ApiHandler {
178
179
if (specificFailureStatus) {
180
return {
181
statusCode: specificFailureStatus,
- headers: { 'Cache-Control': 'no-store' },
182
+ headers: {
183
+ 'Cache-Control': 'no-store',
184
+ ...getCorsResponseHeaders(event)
185
+ },
186
body: e.message
187
}
188
} else {
0 commit comments