Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Commit 85641dc

Browse files
committed
report json encoding error
1 parent 9c6dc70 commit 85641dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src-colladmin/actions/zookeeper_action.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ def get_data(n)
119119

120120
begin
121121
JSON.parse(d.encode('UTF-8'), symbolize_names: true)
122+
rescue JSON::ParserError
123+
d
122124
rescue StandardError => e
123-
"#{e}: #{d}"
125+
"\n #{e.class}:#{e}:\n #{d}"
124126
end
125127
end
126128

0 commit comments

Comments
 (0)