Skip to content

Commit

Permalink
fix ? (not tested
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoobes committed Mar 16, 2024
1 parent b191a7a commit 0d722de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/core/operators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ export function handleError<C>(crashHandler: ErrorHandling, emitter: Emitter, lo
return (pload: unknown, caught: Observable<C>) => {
// This is done to fit the ErrorHandling contract
const err = pload instanceof Error ? pload : Error(util.inspect(pload, { colors: true }));
emitter.emit('error', err);
//formatted payload
logging?.error({ message: util.inspect(pload) });
crashHandler.updateAlive(err);
if(!emitter.emit('error', err)) {
logging?.error({ message: util.inspect(pload) });
crashHandler.updateAlive(err);
}
return caught;
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/structures/services/error-handling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class DefaultErrorHandling implements ErrorHandling {
throw err;
}

#keepAlive = 5;
#keepAlive = 1;

updateAlive(err: Error) {
this.#keepAlive--;
Expand Down

0 comments on commit 0d722de

Please sign in to comment.