View Issue Details

IDProjectCategoryView StatusLast Update
0000247NNW API ServiceUncategorizedpublicJanuary 13, 2017, 11:36 am
ReporterScott Bradford Assigned ToScott Bradford  
PriorityhighSeverityminor 
Status closedResolutionfixed 
Product Version0.7 
Summary0000247: Verify JSON Validity and Auth State Before Sending to Client
Description

Verify JSON Validity and Auth State Before Sending to Client

Activities

Scott Bradford

August 20, 2014, 9:17 am

administrator   ~0000528

In at least some cases we're generating invalid JSON, which is throwing an error on the client side when they receive it.

In my case, it was 'Not authorized.' -- which shouldn't happen when you're visiting from the app! How did we lose the session?

So we need to do a few things:

1) Not-authorized should be returned as JSON so the client can process and act on it.

2) If the client receives the 'Not-authorized' error, we should reload the page to reestablish the PHP session.

3) We should log all authorization errors (with API key and/or session ID).

4) We should test all JSON to see if it's valid before we spit it out to the client. If not, we should log it and give a nicer error message.

Scott Bradford

August 20, 2014, 4:02 pm

administrator   ~0000529

Done.

Scott Bradford

August 18, 2015, 1:23 pm

administrator   ~0001056

Closing (all resolved and published)

Issue History

Date Modified Username Field Change
December 31, 1969, 7:33 pm Scott Bradford Status @0@ => @0@
December 31, 1969, 7:33 pm Scott Bradford Resolution @0@ => @0@
August 20, 2014, 9:17 am Scott Bradford New Issue
August 18, 2015, 10:43 am Scott Bradford Project @44@ => No-Nonsense Weather
August 18, 2015, 11:19 am Scott Bradford Category General => Uncategorized
August 18, 2015, 1:23 pm Scott Bradford Note Added: 0001056
August 18, 2015, 1:23 pm Scott Bradford Status resolved => closed
September 24, 2016, 5:14 pm Scott Bradford Project No-Nonsense Weather => NNW API Service
January 13, 2017, 11:36 am Changeset attached => NNW Web trunk r694
January 13, 2017, 11:36 am Changeset attached => NNW Web trunk r704