Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-2453

API request for an issue that doesn't exist returns full traceback with information about the server (BB-1155)

    XMLWordPrintable

Details

    Description

      I'm using api for fetching issue data, and when I send request for issue that doesn't exist I get full traceback with information about the server:

      {{{

      curl -k https://api.bitbucket.org/1.0/repositories/<some_user>/<some_project>/issues/64/

      Piston/0.2.3rc1 (Django 1.2.4) crash report:

      Traceback (most recent call last):

      File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/..
      /bitbucket/apps/api/v10/handlers.py", line 1202, in read
      return Issue.objects.get(repository=repo, local_id=issue_id)

      File "/opt/python/domains/bitbucket.org/2010-09-28
      /bitbucket/local/env/lib/python2.7/site-packages
      /django/db/models/manager.py", line 132, in get
      return self.get_query_set().get(*args, **kwargs)

      File "/opt/python/domains/bitbucket.org/2010-09-28
      /bitbucket/local/env/lib/python2.7/site-packages
      /django/db/models/query.py", line 347, in get
      % self.model._meta.object_name)

      DoesNotExist: Issue matching query does not exist.
      }}}

      Showing too much data about the server, file locations etc. is not preferred practice (security reasons). I was expecting: Not found (404).

      Attachments

        Activity

          People

            Unassigned Unassigned
            a3d5f7d26c60 trebor74hr
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: