(
reply: { send(payload: unknown): unknown },
requestId: string,
err: unknown,
)
| 164 | } |
| 165 | |
| 166 | function sendMappedError( |
| 167 | reply: { send(payload: unknown): unknown }, |
| 168 | requestId: string, |
| 169 | err: unknown, |
| 170 | ): void { |
| 171 | if (err instanceof WorkspaceNotFoundError) { |
| 172 | reply.send(errEnvelope(ErrorCode.WORKSPACE_NOT_FOUND, err.message, requestId)); |
| 173 | return; |
| 174 | } |
| 175 | if (err instanceof WorkspaceRootNotFoundError) { |
| 176 | reply.send(errEnvelope(ErrorCode.FS_PATH_NOT_FOUND, err.message, requestId)); |
| 177 | return; |
| 178 | } |
| 179 | throw err; |
| 180 | } |
no test coverage detected