Skip to content

Commit

Permalink
Stop throwing JSON-RPC errors received by the process
Browse files Browse the repository at this point in the history
  • Loading branch information
d-gubert committed Jun 25, 2024
1 parent 857a84a commit f54ca4e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/ProxiedApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ export class ProxiedApp {
throw new AppsEngineException(e.message);
}

// We cannot throw this error as the previous implementation swallowed those
// and since the server is not prepared to handle those we might crash it if we throw
// Range of JSON-RPC error codes: https://www.jsonrpc.org/specification#error_object
if (e.code >= -32999 || e.code <= -32000) {
throw e;
// we really need to receive a logger from rocket.chat
console.error('JSON-RPC error received: ', e);
}
}
}
Expand Down

0 comments on commit f54ca4e

Please sign in to comment.