Creating a database that already exists in the glue data catalog raises an exception
This commit is contained in:
parent
e67a8c6f1b
commit
c5c57efbb5
3 changed files with 29 additions and 5 deletions
|
|
@ -1,9 +1,15 @@
|
|||
from __future__ import unicode_literals
|
||||
from moto.core.exceptions import RESTError
|
||||
from moto.core.exceptions import JsonRESTError
|
||||
|
||||
|
||||
class GlueClientError(RESTError):
|
||||
class GlueClientError(JsonRESTError):
|
||||
code = 400
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs.setdefault('template', 'single_error')
|
||||
super(GlueClientError, self).__init__(*args, **kwargs)
|
||||
|
||||
class DatabaseAlreadyExistsException(GlueClientError):
|
||||
def __init__(self):
|
||||
self.code = 400
|
||||
super(DatabaseAlreadyExistsException, self).__init__(
|
||||
'DatabaseAlreadyExistsException',
|
||||
'Database already exists.'
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue