Commit 13708cb4 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

fix exception (error 500) when token is not valid

parent 51a11149
......@@ -9,7 +9,7 @@ module Api::V1
def request_http_token_authentication(realm = "Application")
def request_http_token_authentication(realm = "Application", message=nil)
self.headers["WWW-Authenticate"] = %(Token realm="#{realm.gsub(/"/, "")}")
self.__send__ :render, :json => { :error => "HTTP Token: Access denied. You did not provide an valid API key." }.to_json, :status => :unauthorized
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment