Skip to content

Commit

Permalink
Truncate object-string in err msg to 20 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmaroli committed Mar 24, 2023
1 parent e9f5d3f commit 9e680e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/jekyll/filters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ def read_liquid_attribute(liquid_data, property)
end
rescue TypeError => e
msg = if liquid_data.is_a?(Array)
"Error accessing object (#{liquid_data}) with given key. Expected an integer but " \
"got #{property.inspect} instead"
"Error accessing object (#{liquid_data.to_s[0...20]}) with given key. Expected an " \
"integer but got #{property.inspect} instead."
else
e.message
end
Expand Down

0 comments on commit 9e680e9

Please sign in to comment.