Raise a 409 if we try to insert a tag twice at the same time

Also fixes handling of labels for existing manifests

Fixes #1775
This commit is contained in:
Joseph Schorr 2016-08-29 11:58:18 -04:00
parent 3f459523c4
commit 357005e33f
5 changed files with 36 additions and 12 deletions

View file

@ -99,6 +99,13 @@ class SizeInvalid(V2RegistryException):
detail)
class TagAlreadyExists(V2RegistryException):
def __init__(self, detail=None):
super(TagAlreadyExists, self).__init__('TAG_ALREADY_EXISTS',
'tag was already pushed',
detail,
409)
class TagInvalid(V2RegistryException):
def __init__(self, detail=None):
super(TagInvalid, self).__init__('TAG_INVALID',