Uploaded image for project: 'ListenBrainz'
  1. ListenBrainz
  2. LB-73

return meaningful errors with bad requests.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • API
    • None

      currently, i don't think the "_validate_auth_header()" function is working as expected...

      https://github.com/metabrainz/listenbrainz-server/blob/master/webserver/views/api.py#L108

      if you omit the "Authorization" header completely, it returns HTTP status 0 with no response text.
      if you include the "Authorization" header but with no token, it also returns HTTP status 0 with no response text.

      and if you omit the "artist_name" or "track_name" parameters, you do get a meaningful error.. but it's returned as HTML. it should be JSON.

            Unassigned Unassigned
            marc2k3 marc
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package