UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

23 lines 912 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PageAiException = void 0; /** * This exception is thrown if a call to `donobuPage.ai` (i.e. an autonomous flow) * finishes to a state that is not {@link State.SUCCESS}. */ class PageAiException extends Error { constructor(originalInstruction, metadata) { const resultDetails = metadata.result ? `Result payload:\n${JSON.stringify(metadata.result, null, 2)}` : 'No result payload was returned.'; super([ `page.ai flow stopped in state ${metadata.state} (expected SUCCESS).`, `Original instruction: ${originalInstruction}`, resultDetails, ].join('\n')); this.originalInstruction = originalInstruction; this.metadata = metadata; } } exports.PageAiException = PageAiException; //# sourceMappingURL=PageAiException.js.map