OGKevin / ComBunqWebApp

A Bunq web interface made by bunqers
https://bunqweb.com
MIT License
26 stars 3 forks source link

JSONDecodeError: Expecting value: line 1 column 1 (char 0) #110

Open OGKevin opened 7 years ago

OGKevin commented 7 years ago

https://sentry.io/share/issue/3137323731332e333034363033323838/

JSONDecodeError: Expecting value: line 1 column 1 (char 0)
(5 additional frame(s) were not displayed)
...
  File "BunqWebApp/views.py", line 116, in post
    session = self.store_in_session(file_contents, password, username)
  File "BunqWebApp/views.py", line 147, in store_in_session
    data = json.loads(data)
  File "json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This should return a error to the user instead of 500.