Skip to content

Commit f769676

Browse files
justin808claude
andcommitted
Improve JsonParseError message formatting
Use heredoc for better readability of multi-line error message. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 8976d09 commit f769676

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/react_on_rails/json_parse_error.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ class JsonParseError < ::ReactOnRails::Error
77
def initialize(parse_error:, json:)
88
@json = json
99
@original_error = parse_error
10-
message = "#{parse_error.message}\n\n#{Utils.default_troubleshooting_section}"
10+
message = <<~MSG
11+
#{parse_error.message}
12+
13+
#{Utils.default_troubleshooting_section}
14+
MSG
1115
super(message)
1216
end
1317

0 commit comments

Comments
 (0)