From abd4d09afea841d6afe985fbf873998b20726402 Mon Sep 17 00:00:00 2001 From: Seiro Ogasawara Date: Mon, 13 Nov 2017 17:54:10 +0900 Subject: [PATCH] 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 --- moto/iot/exceptions.py | 6 +++--- moto/iotdata/exceptions.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/moto/iot/exceptions.py b/moto/iot/exceptions.py index 0e1ac8937..4bb01c095 100644 --- a/moto/iot/exceptions.py +++ b/moto/iot/exceptions.py @@ -1,14 +1,14 @@ 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 class ResourceNotFoundException(IoTClientError): def __init__(self): - self.code = 400 + self.code = 404 super(ResourceNotFoundException, self).__init__( "ResourceNotFoundException", "The specified resource does not exist" diff --git a/moto/iotdata/exceptions.py b/moto/iotdata/exceptions.py index d55b16e3c..ddc6b37fd 100644 --- a/moto/iotdata/exceptions.py +++ b/moto/iotdata/exceptions.py @@ -1,14 +1,14 @@ 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 class ResourceNotFoundException(IoTDataPlaneClientError): def __init__(self): - self.code = 400 + self.code = 404 super(ResourceNotFoundException, self).__init__( "ResourceNotFoundException", "The specified resource does not exist"