Skip to content

Commit 1a40282

Browse files
committed
Further updates to allow for 500 to not be a JSON payload
Signed-off-by: Mike Raineri <michael.raineri@dell.com>
1 parent 1328f92 commit 1a40282

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/redfish/rest/v1.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ def dict(self):
255255
return {}
256256
return json.loads(self.text)
257257
except:
258+
if self.status == 500:
259+
# Make an allowance for 500 status codes
260+
# Depending on the reason for the error, it's possible the web server may not be able to support Redfish handling
261+
return {}
258262
str = "Service responded with invalid JSON at URI {}\n{}".format(
259263
self._rest_request.path, self.text)
260264
LOGGER.error(str)

0 commit comments

Comments
 (0)