Raise custom auth error, re-raise on failed re-auth
This commit is contained in:
@@ -26,7 +26,7 @@ class Lndhub
|
||||
data = JSON.parse(res.body)
|
||||
|
||||
if data.is_a?(Hash) && data["error"] && data["message"] == "bad auth"
|
||||
raise "BAD_AUTH"
|
||||
raise AuthError
|
||||
else
|
||||
data
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user