moto/moto/iotdata/exceptions.py
Seiro Ogasawara abd4d09afe fix error response on iot/iot-data (#1337)
* fix iot/iot-data's:
- format of response body xml to json
- status code 400 to 404 on ResourceNotFound

* for ci test
2017-11-13 08:54:10 +00:00

24 lines
645 B
Python

from __future__ import unicode_literals
from moto.core.exceptions import JsonRESTError
class IoTDataPlaneClientError(JsonRESTError):
code = 400
class ResourceNotFoundException(IoTDataPlaneClientError):
def __init__(self):
self.code = 404
super(ResourceNotFoundException, self).__init__(
"ResourceNotFoundException",
"The specified resource does not exist"
)
class InvalidRequestException(IoTDataPlaneClientError):
def __init__(self, message):
self.code = 400
super(InvalidRequestException, self).__init__(
"InvalidRequestException", message
)