Advanced Bot Architecture and Error Handling
Designing for failure
Production bots must assume things go wrong. Candidates should understand try/catch/finally style error handling, exception types (system vs business), retry logic, and logging. Distinguish recoverable errors (transient UI delay) from non-recoverable ones (missing credentials) and design responses accordingly. Know how to resume a bot from a checkpoint and how to record enough context to debug later.
Architecture patterns
Understand modular design: reusable sub-tasks, a parent/child orchestration pattern, and separation of concerns (data retrieval, processing, reporting). Know how queues/work items support transactional processing so one failed item does not halt the batch. Understand idempotency - re-running a step should not duplicate side effects.
Common traps
A frequent trap is catching all exceptions and silently continuing, which hides defects. Another is treating a business exception (e.g., invalid invoice) as a system crash, or vice versa. Questions may imply that retries fix logic errors - they do not; retries address transient conditions.
Rule of thumb
For each step ask: What can fail here, is it transient or permanent, and what should the bot do - retry, skip, or stop? Log the answer.