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

Method toJSON

packages/db/src/errors.ts:46–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 }
45
46 toJSON(): ITriplitError {
47 return {
48 name: this.name,
49 message: this.message,
50 baseMessage: this.baseMessage,
51 status: this.status,
52 contextMessage: this.contextMessage,
53 };
54 }
55 static fromJson(json: any) {
56 const error = new TriplitError(json.contextMessage);
57 if (json.baseMessage) error.baseMessage = json.baseMessage;

Callers 15

createTriplitHonoServerFunction · 0.95
errorResponseMethod · 0.95
toStringMethod · 0.95
warnErrorMethod · 0.45
sendErrorMessageFunction · 0.45
sendErrorMessageFunction · 0.45
sendErrorMessageFunction · 0.45
createServerFunction · 0.45
adminAccessRequiredFunction · 0.45
useHttpTokenFunction · 0.45
handleRequestMethod · 0.45
NotAdminResponseFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected