Turns a server ErrorResponse into the exception the caller catches, choosing by SQLSTATE.
ErrorResponse
SQLSTATE