desk icon indicating copy to clipboard operation
desk copied to clipboard

422 error response not parsed correctly

Open thomasbalsloev opened this issue 10 years ago • 5 comments

Hi Chris.

It seems the error body is not parsed correctly for 422 errors. The 422 response format is http://dev.desk.com/API/using-the-api/#validation-codes which the error_body method is not parsing correctly.

I only get error messages like this missing the body part: POST https://xxx.desk.com/api/v2/cases: 422

Secondly, it would be useful to be able to access the raw response body for getting the complete info of the error.

Best regards, Thomas Balsløv.

thomasbalsloev avatar Jan 06 '15 12:01 thomasbalsloev

Thanks for letting us know - do you want to take a look at fixing it? Just fork the repo and then submit a pull request and I'll get it all published.

chriswarren avatar Jan 06 '15 17:01 chriswarren

Hi Chris. Sorry for getting back so late on this. I do not have the time at my workplace for this, at least not currently. So if another wants to take a shot at this it would be most welcome.

Thomas.

thomasbalsloev avatar Jan 20 '15 09:01 thomasbalsloev

Just noting that I'm having the same problem, which makes this gem essentially unusable for the time being. Does anyone know if there's a way to access the error through some kind of hack, until it gets fixed?

robins35 avatar May 28 '15 15:05 robins35

@colinc Do you have any thoughts on this?

chriswarren avatar May 28 '15 20:05 chriswarren

Hey Guys. I hope this finds you well. I'm just wondering where we are on this. It looks like there's an open PR, but it's just been sitting there for months.

I'm wondering if there's anything that I can do. I've looked at @robins35's code, and it looks good to me. I'm not sure about the removal of pony, and if perhaps that is causing the failing build for final commit.

Please let me know. I'd love to help and get this added to the gem. Cheers.

milanij avatar Sep 17 '15 00:09 milanij