Fix telegram error translation keys

This commit is contained in:
David Taylor 2017-07-28 13:25:31 +01:00
parent 5a4faa637f
commit a5d62bd44d
1 changed files with 2 additions and 2 deletions

View File

@ -92,9 +92,9 @@ module DiscourseChat
if not response['ok'] == true
error_key = nil
if response['description'].include? 'chat not found'
error_key = 'chat_integration.provider.telegram.channel_not_found'
error_key = 'chat_integration.provider.telegram.errors.channel_not_found'
elsif response['description'].include? 'Forbidden'
error_key = 'chat_integration.provider.telegram.forbidden'
error_key = 'chat_integration.provider.telegram.errors.forbidden'
end
raise ::DiscourseChat::ProviderError.new info: {error_key: error_key, message: message, response_body:response}
end