MockFit icon indicating copy to clipboard operation
MockFit copied to clipboard

Add support to error response on specific endpoints

Open javaherisaber opened this issue 3 years ago • 0 comments

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

javaherisaber avatar Dec 16 '20 07:12 javaherisaber