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

Missing headers in API error responses

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • None

      Ladies and gentlemen, on this momentous occasion of our thousandth ticket, I salute you for reading the following:

      As was previously described in LB-999ᴬ , albeit in a cold machine-like fashion, the front-end issue our troop encountered (cannot access API response headers) is rather baffling.
      Prepared we were, bathed, anointed and dressed for battle; but fate seldom chooses quiet times to strike.
      As we were expecting the "X-RateLimit-Remaining" and "X-RateLimit-Reset-In" headers to exist on any API response, little did we know this blind faith in the inner workings of our Great Beast was founded on nothing but hope.

      After perusing certain sentry issuesᴮ issued from the LastFM Importer page, there the proof lied: after a failed API request the response headers are not set.
      The front-end code tried to access them directly without checking if the headers are there.

      The resulting situation is unexpected and dare I say surprising!
      How and why our expected headers, now forlorn, came to be but the memories of ghosts, this quest for a knowledge that few ever sought is, no, must be our salvation.

      Ye who shall work on this ticket, I bid you good day, and godspeed !

      ᴬ: https://tickets.metabrainz.org/browse/LB-999
      ᴮ: https://sentry.metabrainz.org/organizations/metabrainz/issues/393/?environment=production&project=15&query=is%3Aunresolved

            riksucks riksucks
            mr_monkey Monkey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package