Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 04:45 UTC
| 1 | import { Data, Runtime } from 'effect'; |
| 2 | import { requestError } from 'src/effects/request-error'; |
| 3 | |
| 4 | /** |
| 5 | * A proxy call refused before sending it because the toolkit is not connected, already reported |
| 6 | * on stderr and as `{ "successful": false, ... }` on stdout. The runtime prints nothing more |
| 7 | * (`[Runtime.errorReported]` is false) and exits 1. |
| 8 | */ |
| 9 | export class ReportedProxyCommandError extends Data.TaggedError( |
| 10 | 'commands/ReportedProxyCommandError' |
| 11 | )<{ |
| 12 | readonly message: string; |
| 13 | readonly toolkit: string; |
| 14 | readonly endpoint: string; |
| 15 | }> { |
| 16 | get [Runtime.errorReported]() { |
| 17 | return false; |
| 18 | } |
| 19 | |
| 20 | get [Runtime.errorExitCode]() { |
| 21 | return 1; |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | export class ProxyRequestError extends requestError('commands/ProxyRequestError') {} |