BrauzerLab
← Back to missions 43 / 50

Simulate a 500 Error

Medium ~240 sec

Testing server errors does not require a real failure — you can simulate any HTTP status code using page.route.

Status code simulation (route.fulfill({ status: 500 })) responds to the request as an internal server error. A correctly written UI should catch this state and display an error banner.

page is already available. Intercept the request to /api/save, respond with 500, then click the «Save» button to trigger the error banner.

Different valid solutions are accepted — full path, glob pattern, or an additional body.

TASK

Simulate a 500 error.

Provided for you
import { test, expect } from '@playwright/test';

test('Simulate a 500 Error', async ({ page }) => {
  await page.goto('https://lab.local/mission/simulate-500');
  // ↓ Your code goes below ↓
});
Editor
https://lab.local/mission/simulate-500
Loading...
Results will appear here — press Run or Check.