feat: better error handle for sse endpoint (#10155)

fix CLOUD-123
This commit is contained in:
darkskygit
2025-02-13 10:10:13 +00:00
parent a7de6edfef
commit 899b1d60e0
2 changed files with 56 additions and 51 deletions

View File

@@ -134,9 +134,9 @@ export const GatewayErrorWrapper = (event: string): MethodDecorator => {
};
};
export function mapSseError(originalError: any) {
export function mapSseError(originalError: any, info: object) {
const error = mapAnyError(originalError);
error.log('Sse');
error.log('Sse', info);
metrics.sse.counter('error').add(1, { status: error.status });
return of({
type: 'error' as const,