more flexible client error constructor
Opened this issue · 0 comments
kellyredding commented
Right now you have to build a response formally to build a client error. It would be nice to have a factory method or a more flexible constructor that would allow you to just give the response code/body and it would do the ceremony of building the response for the client error for you.
This came up in testing error scenarios on a service that wasn't being used directly but needed to raise a client error. We can use the existing test helpers to achieve it but really all we want is to raise that client error.