Skip to content

Commit 543ffb3

Browse files
committed
Fix JSON parse error class
1 parent 45efc3b commit 543ffb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Message.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static function parse(string $msg): Message
2525
{
2626
$decoded = json_decode($msg);
2727
if (json_last_error() !== JSON_ERROR_NONE) {
28-
throw new ResponseError(json_last_error_msg(), ErrorCode::PARSE_ERROR);
28+
throw new Error(json_last_error_msg(), ErrorCode::PARSE_ERROR);
2929
}
3030
if (Notification::isNotification($decoded)) {
3131
$obj = new Notification($decoded->method, $decoded->params ?? null);

0 commit comments

Comments
 (0)