Automation lab Aú API Interaction & Mocking (API_INTERACTION)
Lab 036: Handle 500 server error from API
Practice handle 500 server error from api in a real web app context as part of the API Interaction & Mocking module.
intermediate
intermediate
Objectives
Use for test scripts- Understand the purpose and business flow of handle 500 server error from api.
- Design stable locators for key UI elements.
- Automate user interactions and verify the resulting UI state.
Sandbox
API & Network • api • intermediate • active
Handle 500 server error from API
Surface server failures, allow retry, and recover gracefully.
Reading and understanding requirements
Choosing stable locators
Designing assertions based on business rules
Learning objectives
- Detect 500 responses.
- Show retry affordance.
- Verify recovery after retry.
Steps
- Trigger API call to get 500.
- Assert error banner and status.
- Retry to succeed and display data.
Practice sandbox
Simulate 500 then retry.
Server error: 500
Data loaded after retry
Idle
Assertions to practice
- 500 shows banner and enables retry.
- Retry hides error, shows success.
- Status text reflects each phase.