fix: receipt-import 201/octet-stream, quick-import types, exception filter guard

This commit is contained in:
Nils-Johan Gynther
2026-04-30 13:25:02 +02:00
parent 1def3c588e
commit 0e525b0d17
@@ -24,6 +24,12 @@ export class GlobalExceptionFilter implements ExceptionFilter {
private readonly logger = new Logger(GlobalExceptionFilter.name); private readonly logger = new Logger(GlobalExceptionFilter.name);
catch(exception: any, host: ArgumentsHost) { catch(exception: any, host: ArgumentsHost) {
// Guard: only handle HTTP contexts (not WebSocket, RPC, etc.)
if (!host || host.getType() !== 'http') {
this.logger.error(`Non-HTTP exception caught: ${exception?.message ?? exception}`);
return;
}
const ctx = host.switchToHttp(); const ctx = host.switchToHttp();
const response = ctx.getResponse<Response>(); const response = ctx.getResponse<Response>();
const request = ctx.getRequest(); const request = ctx.getRequest();