rocket_pants icon indicating copy to clipboard operation
rocket_pants copied to clipboard

Empty "error" in JSON response.

Open SirRawlins opened this issue 11 years ago • 4 comments

Hi There,

I'm using Devise/Warden to do token authentication on the API. When calling the authenticate_user! before filter in my API controller with invalid credentials a 401 appears to be returned as expected, however the error packet in the JSON response is empty. i.e.

{"error:""}

I would have expected to see the Unauthenticated error details here, as I do if I manual throw error! :unauthenticated

This is using devise 3.0 and RocketPants 1.9.1

Any advice greatly appreciated.

Robert

SirRawlins avatar Apr 30 '14 14:04 SirRawlins

@SirRawlins Hey Robert,

Would it be possible to get a mini rails app w/ devise and rocket pants recreating this issue? I'm not sure what devise handles internally, and my presumption is it's our default fallback causing issues, but it is very, very odd.

Sutto avatar May 06 '14 23:05 Sutto

@Sutto good idea. I'll try and get an example app together later this week / early next to see if we can reproduce what it going on.

I'll be sure to keep you posted.

SirRawlins avatar May 07 '14 09:05 SirRawlins

Hey @SirRawlins, unless there was any follow up to this I'm going to close this error as I have nothing to go on - sorry!

Sutto avatar May 25 '15 12:05 Sutto

Hi Darcy, by all means close this off, I ended up moving on to other projects and haven't looked back at it. Someone can always reopen the ticket if it crops up in future.

Cheers,

Rob On 25 May 2015 1:56 pm, "Darcy Laycock" [email protected] wrote:

Hey @SirRawlins https://github.com/SirRawlins, unless there was any follow up to this I'm going to close this error as I have nothing to go on

  • sorry!

— Reply to this email directly or view it on GitHub https://github.com/Sutto/rocket_pants/issues/99#issuecomment-105228173.

SirRawlins avatar May 25 '15 16:05 SirRawlins