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
This commit is contained in:
Seiro Ogasawara 2017-11-13 17:54:10 +09:00 committed by Terry Cain
parent 5f8c7d372e
commit abd4d09afe
2 changed files with 6 additions and 6 deletions

View File

@ -1,14 +1,14 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from moto.core.exceptions import RESTError from moto.core.exceptions import JsonRESTError
class IoTClientError(RESTError): class IoTClientError(JsonRESTError):
code = 400 code = 400
class ResourceNotFoundException(IoTClientError): class ResourceNotFoundException(IoTClientError):
def __init__(self): def __init__(self):
self.code = 400 self.code = 404
super(ResourceNotFoundException, self).__init__( super(ResourceNotFoundException, self).__init__(
"ResourceNotFoundException", "ResourceNotFoundException",
"The specified resource does not exist" "The specified resource does not exist"

View File

@ -1,14 +1,14 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from moto.core.exceptions import RESTError from moto.core.exceptions import JsonRESTError
class IoTDataPlaneClientError(RESTError): class IoTDataPlaneClientError(JsonRESTError):
code = 400 code = 400
class ResourceNotFoundException(IoTDataPlaneClientError): class ResourceNotFoundException(IoTDataPlaneClientError):
def __init__(self): def __init__(self):
self.code = 400 self.code = 404
super(ResourceNotFoundException, self).__init__( super(ResourceNotFoundException, self).__init__(
"ResourceNotFoundException", "ResourceNotFoundException",
"The specified resource does not exist" "The specified resource does not exist"