MockFit
MockFit copied to clipboard
Add support to error response on specific endpoints
Problem statement
I want to return error response for a specific endpoint eg. 500 error
Possible solution
Just like apiIncludeIntoMock
array, we can pass another object to define which endpoints to show error
eg. a list of this pair "[POST] customer/cart/{id}/update2" to 500
Alternative solutions
We can also provide a way to pass error response body for each error code into MockFit constructor so that we can use it to return error body