MCPcopy
hub / github.com/aspen-cloud/triplit / errorResponse

Method errorResponse

packages/server-core/src/session.ts:277–288  ·  view source on GitHub ↗
(e: unknown, options?: { fallbackMessage?: string })

Source from the content-addressed store, hash-verified

275 }
276
277 errorResponse(e: unknown, options?: { fallbackMessage?: string }) {
278 if (isTriplitError(e)) {
279 return ServerResponse(e.status, e.toJSON());
280 }
281 this.server.exceptionReporter(e);
282 const generalError = new TriplitError(
283 options?.fallbackMessage ??
284 'An unknown error occurred processing your request.'
285 );
286 logger.error('Error processing request', e as Error);
287 return ServerResponse(generalError.status, generalError.toJSON());
288 }
289 async handleWebhooksJSONPush({
290 webhooks,
291 }: {

Callers 11

clearDBMethod · 0.95
fetchMethod · 0.95
insertMethod · 0.95
bulkInsertMethod · 0.95
applyChangesMethod · 0.95
updateMethod · 0.95
deleteMethod · 0.95
deleteAllMethod · 0.95
handleWebhooksClearMethod · 0.95
handleWebhooksGetMethod · 0.95

Calls 4

toJSONMethod · 0.95
isTriplitErrorFunction · 0.85
ServerResponseFunction · 0.85
errorMethod · 0.45

Tested by

no test coverage detected