PlaceAVote / pav-api

This repository contains the Placeavote API.
0 stars 0 forks source link

Error responses from API result in invalid body's in response body. #35

Open HistoireDeBabar opened 8 years ago

HistoireDeBabar commented 8 years ago

Hey, so this is pretty minor. Some of the logs that are showing on track js (the Unexpected token ones) are down to the api not returning a parseable json body when the response is an error (e.g. 401). This could be resolved if the body of the response (even if it's a error) is still json.

Culprits:

I'll update if I find others.

johnboy14 commented 8 years ago

@ioannis mentioned this in a previous ticket with some bodies. I was pretty nieve relying on status codes completely in some cases