There is a check and an exception being thrown in case the response type is "text". However, the thrown error does not provide a message explaining the reason to the user. I did not mean to insert the verification back in, but I would like the thrown errors to provide a message similar to the one that was provided here. Sorry for not being clear.