|
15 | 15 | from matter_server.common.helpers.json import json_dumps, json_loads
|
16 | 16 | from matter_server.common.models import EventType
|
17 | 17 |
|
18 |
| -from ..common.errors import InvalidArguments, InvalidCommand, MatterError, SDKStackError |
| 18 | +from ..common.errors import InvalidArguments, InvalidCommand, MatterError |
19 | 19 | from ..common.helpers.api import parse_arguments
|
20 | 20 | from ..common.helpers.util import dataclass_from_dict
|
21 | 21 | from ..common.models import (
|
@@ -204,16 +204,10 @@ async def _run_handler(
|
204 | 204 | # only print the full stacktrace if debug logging is enabled
|
205 | 205 | exc_info=err if self._logger.isEnabledFor(logging.DEBUG) else None,
|
206 | 206 | )
|
207 |
| - self._send_message( |
208 |
| - ErrorResultMessage(msg.message_id, SDKStackError.error_code, str(err)) |
209 |
| - ) |
210 |
| - except Exception as err: # pylint: disable=broad-except |
211 |
| - self._logger.exception( |
212 |
| - "Unhandled exception while handling: %s", |
213 |
| - msg.command, |
214 |
| - ) |
215 |
| - error_code = getattr(err, "error_code", 0) |
216 | 207 | self._send_message(ErrorResultMessage(msg.message_id, error_code, str(err)))
|
| 208 | + except Exception as err: |
| 209 | + self._send_message(ErrorResultMessage(msg.message_id, 0, str(err))) |
| 210 | + raise err |
217 | 211 |
|
218 | 212 | async def _writer(self) -> None:
|
219 | 213 | """Write outgoing messages."""
|
|
0 commit comments