alterm4nn/ChronoZoom — pull request #677 by javierluraschi (2013-06-18 04:35:49+00:00)
Title: Bug #440: No Element Found

Code Review: http://mrccodereview.cloudapp.net/ui#review:id=1265

The problem is that in FireFox all JSON responses must be JSON. In this case, GetProfile API returns "" which is strictly speaking not JSON. The fix is to return an empty User object when the profile is not set and maintain the logic to return null if the JSON is empty.

Changed also the HTTP error from BAD REQUEST to UNAUTHORIZED which is more suitable.