diff --git a/src/frontend/app/store/effects/api.effects.ts b/src/frontend/app/store/effects/api.effects.ts index 3ed4199877..1216c99321 100644 --- a/src/frontend/app/store/effects/api.effects.ts +++ b/src/frontend/app/store/effects/api.effects.ts @@ -227,7 +227,7 @@ export class APIEffect { const errorCode = endpoint && endpoint.error ? endpoint.error.statusCode.toString() : '500'; let errorResponse = null; if (!succeeded) { - errorResponse = endpoint && (typeof endpoint.errorResponse !== 'string') ? + errorResponse = endpoint && (!!endpoint.errorResponse && typeof endpoint.errorResponse !== 'string') ? endpoint.errorResponse : {} as JetStreamCFErrorResponse; // Use defaults if values are not provided errorResponse.code = errorResponse.code || 0;