# File lib/grape/exceptions/base.rb, line 25 def compose_message(key, **attributes) short_message = translate_message(key, **attributes) if short_message.is_a? Hash @problem = problem(key, **attributes) @summary = summary(key, **attributes) @resolution = resolution(key, **attributes) [['Problem', @problem], ['Summary', @summary], ['Resolution', @resolution]].reduce('') do |message, detail_array| message << "\n#{detail_array[0]}:\n #{detail_array[1]}" unless detail_array[1].blank? message end else short_message end end