path: root/module/obmc/wsgi/examples/websockets
diff options
authorAdriana Kobylak <>2018-08-23 10:44:07 -0500
committerAdriana Kobylak <>2018-08-23 11:12:51 -0500
commita8b05d161ef3367f3fc2f4a5e44a2b0b69a9f3d2 (patch)
tree8042bffa30fb34db14d01c4c54ef6314597b27aa /module/obmc/wsgi/examples/websockets
parent3a9a51c969c2aeb7cceb7b2bee203a10afb2da95 (diff)
rest_dbus: Add read-only property error
There is now support in sdbusplus to mark a property as read-only, so that a REST request to modify it would return org.freedesktop.DBus.Error.PropertyReadOnly. Add support for this error to provide a more useful and compact error instead of the default 500 Internal Error with the traceback. Tested: Instead of a 500 error with traceback, a compact 403 error is displayed: $ curl b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": 50}' https://${bmc}/xyz/openbmc_project/control/power_supply/attr/DeratingFactor { "data": { "description": "org.freedesktop.DBus.Error.PropertyReadOnly: Property 'DeratingFactor' is not writable." }, "message": "403 Forbidden", "status": "error" } Change-Id: I5648a99c7656a6f9d9a8ca967418fabd64b080c6 Signed-off-by: Adriana Kobylak <>
Diffstat (limited to 'module/obmc/wsgi/examples/websockets')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud