Also would be good to extract these begin..rescue stanzas to separate methods methods (this one and the one in `api_error_formatting.rb`