1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #2453 resolved

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

Robert Lujo
created an issue

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).