All files / src/utils error-tool-arguments.ts

100% Statements 2/2
100% Branches 0/0
100% Functions 1/1
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16                      47x 47x      
import { StackOneError } from './error-stackone';
 
/**
 * Raised when a tool's arguments are unusable: not JSON, not an object, or not encodable as
 * JSON.
 *
 * A subclass of {@link StackOneError}, so `catch (e) { if (e instanceof StackOneError) … }`
 * still catches it. Thrown before any request is made.
 */
export class ToolArgumentsError extends StackOneError {
	constructor(message: string, options?: ErrorOptions) {
		super(message, options);
		this.name = 'ToolArgumentsError';
	}
}