Feed error messages through a cors wrapper so that people on other domains can see what's happening.

This commit is contained in:
jakedt 2014-03-17 16:57:35 -04:00
parent 4673f40dd2
commit 3b3d71bfd7
18 changed files with 162 additions and 129 deletions

View file

@ -1,7 +1,5 @@
from flask.ext.restful import abort
from endpoints.api import (resource, nickname, require_repo_read, require_repo_admin,
RepositoryParamResource, log_action)
RepositoryParamResource, log_action, NotFound)
from endpoints.api.image import image_view
from data import model
from auth.auth_context import get_authenticated_user
@ -36,7 +34,7 @@ class RepositoryTagImages(RepositoryParamResource):
try:
tag_image = model.get_tag_image(namespace, repository, tag)
except model.DataModelException:
abort(404)
raise NotFound()
parent_images = model.get_parent_images(tag_image)