include the error messages in the exception

We were passing the response to the constructor, but it wasn't being used. This attempts to get the error messages from the response and use them for the exception message, otherwise the response object itself is used.
@percyperez can you check my work?