Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge commit '9073ab59efe115a1a793de6e4e89a734a872bd99' into HEAD

  • Loading branch information...
commit cee9e15a56c1dc25ac275495e6fa140e144b6a42 2 parents 2dec6e4 + 9073ab5
Jenkins authored
Showing with 6 additions and 2 deletions.
  1. +2 −2 lib/app.rb
  2. +4 −0 lib/zendesk_client.rb
4 lib/app.rb
View
@@ -142,7 +142,7 @@ def on_post(params, route)
if ticket
redirect '/acknowledge'
else
- ExceptionMailer.deliver_exception_notification(env['sinatra.error'])
+ ExceptionMailer.deliver_exception_notification(format_exception_message("There has been a problem", env['sinatra.error']))
500
end
else
@@ -151,7 +151,7 @@ def on_post(params, route)
end
error do
- ExceptionMailer.deliver_exception_notification(env['sinatra.error'])
+ ExceptionMailer.deliver_exception_notification(format_exception_message("There has been a problem", env['sinatra.error']))
500
end
4 lib/zendesk_client.rb
View
@@ -29,6 +29,10 @@ def self.get_client(logger)
if status_401 || too_many_login_attempts
raise ZendeskError.new("Authentication Error", env)
end
+
+ if env[:body]["error"]
+ raise ZendeskError.new("Error creating ticket", env)
+ end
end
@client
Please sign in to comment.
Something went wrong with that request. Please try again.