mirror of
https://github.com/steel-dev/cli.git
synced 2026-09-14 20:47:34 +08:00
20 lines
462 B
TypeScript
20 lines
462 B
TypeScript
export type BrowserAdapterErrorCode =
|
|
| 'MISSING_AUTH'
|
|
| 'RUNTIME_NOT_FOUND'
|
|
| 'SPAWN_ERROR'
|
|
| 'INVALID_BROWSER_ARGS'
|
|
| 'API_ERROR'
|
|
| 'SESSION_NOT_FOUND';
|
|
|
|
export class BrowserAdapterError extends Error {
|
|
readonly code: BrowserAdapterErrorCode;
|
|
readonly cause?: unknown;
|
|
|
|
constructor(code: BrowserAdapterErrorCode, message: string, cause?: unknown) {
|
|
super(message);
|
|
this.name = 'BrowserAdapterError';
|
|
this.code = code;
|
|
this.cause = cause;
|
|
}
|
|
}
|