Skip to content

Commit

Permalink
errors.rb: Mutable strings
Browse files Browse the repository at this point in the history
  • Loading branch information
olleolleolle authored and timrogers committed Jun 1, 2022
1 parent 5cbfa3d commit d713396
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/octokit/error.rb
Expand Up @@ -180,7 +180,7 @@ def response_error
def response_error_summary
return nil unless data.is_a?(Hash) && !Array(data[:errors]).empty?

summary = "\nError summary:\n"
summary = +"\nError summary:\n"
summary << data[:errors].map do |error|
if error.is_a? Hash
error.map { |k,v| " #{k}: #{v}" }
Expand All @@ -196,7 +196,7 @@ def build_error_message
return nil if @response.nil?

message = +"#{@response[:method].to_s.upcase} "
message << redact_url(@response[:url].to_s) + ": "
message << redact_url(@response[:url].to_s.dup) + ": "
message << "#{@response[:status]} - "
message << "#{response_message}" unless response_message.nil?
message << "#{response_error}" unless response_error.nil?
Expand Down

0 comments on commit d713396

Please sign in to comment.