Then the program should get the error "Internal Server Error" with the status 500

Assert the error a program got: the status of the answer and its JSON error (status and error, the reason phrase). A redirect (to the login page) is no error answer.

Examples

Then the program should get the error "Internal Server Error" with the status 500
Then the program should get the error "Forbidden" with the status 403
And the program should get the error "Not Found" with the status 404
Then the program should get the error "Unauthorized" with the status 401
Then the program should get the error "Method Not Allowed" with the status 405

Pattern

Then(/^the program should get the error "([^"]*)" with the status (\d{3})$/, …)

Part of @webship-js/spring-boot-steps (github.com/webship/spring-boot-steps), a step pack for Webship-js 2.0.x.