Commit 3c9ef9eb authored by Patricio Cano's avatar Patricio Cano

Properly rescue from JSON parse.

parent a070ae4a
......@@ -11,8 +11,12 @@ class GitlabLfsAuthentication
end
def self.build_from_json(json)
values = JSON.parse(json) rescue nil
self.new(values['username'], values['lfs_token'], values['repository_http_path'])
begin
values = JSON.parse(json)
self.new(values['username'], values['lfs_token'], values['repository_http_path'])
rescue
nil
end
end
def authentication_payload
......
Markdown is supported
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