(e: any)
| 114 | type MiddlewareFunction = (params: any, con: IGetSender, next: () => Promise<any> | any) => Promise<any> | any; |
| 115 | |
| 116 | const formatErrorToClient = (e: any) => { |
| 117 | if (!e) return `${e}`; |
| 118 | if (typeof e?.message === "string") return e.message; |
| 119 | if (typeof e === "object") { |
| 120 | try { |
| 121 | return JSON.stringify(e); |
| 122 | } catch { |
| 123 | // ignored |
| 124 | } |
| 125 | } |
| 126 | return e.toString(); |
| 127 | }; |
| 128 | |
| 129 | export class Server { |
| 130 | private apiFunctionMap: Map<string, ApiFunction> = new Map(); |
no outgoing calls
no test coverage detected