aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--klippy/extras/bed_mesh.py4
-rw-r--r--klippy/webhooks.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/klippy/extras/bed_mesh.py b/klippy/extras/bed_mesh.py
index 7afec299..e78ebaeb 100644
--- a/klippy/extras/bed_mesh.py
+++ b/klippy/extras/bed_mesh.py
@@ -530,7 +530,7 @@ class BedMeshCalibrate:
try:
z_mesh.build_mesh(probed_matrix)
except BedMeshError as e:
- raise self.gcode.error(e.message)
+ raise self.gcode.error(str(e))
self.bedmesh.set_mesh(z_mesh)
self.gcode.respond_info("Mesh Bed Leveling Complete")
self.bedmesh.save_profile("default")
@@ -988,7 +988,7 @@ class ProfileManager:
try:
z_mesh.build_mesh(probed_matrix)
except BedMeshError as e:
- raise self.gcode.error(e.message)
+ raise self.gcode.error(str(e))
self.current_profile = prof_name
self.bedmesh.set_mesh(z_mesh)
def remove_profile(self, prof_name):
diff --git a/klippy/webhooks.py b/klippy/webhooks.py
index 7fffc1fe..2deed429 100644
--- a/klippy/webhooks.py
+++ b/klippy/webhooks.py
@@ -29,7 +29,7 @@ class WebRequestError(gcode.CommandError):
def to_dict(self):
return {
'error': 'WebRequestError',
- 'message': self.message}
+ 'message': str(self)}
class Sentinel:
pass
@@ -224,12 +224,12 @@ class ClientConnection:
func = self.webhooks.get_callback(web_request.get_method())
func(web_request)
except self.printer.command_error as e:
- web_request.set_error(WebRequestError(e.message))
+ web_request.set_error(WebRequestError(str(e)))
except Exception as e:
msg = ("Internal Error on WebRequest: %s"
% (web_request.get_method()))
logging.exception(msg)
- web_request.set_error(WebRequestError(e.message))
+ web_request.set_error(WebRequestError(str(e)))
self.printer.invoke_shutdown(msg)
result = web_request.finish()
if result is None: