Skip to content

Commit

Permalink
Bring back nil check for constructing credential error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
cacheflow committed Dec 18, 2024
1 parent bb13556 commit 6462a34
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/fcm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,14 @@ def jwt_token

def credentials_error_msg(param)
error_msg = 'credentials must be an IO-like ' \
'object or path You passed '
'object or path '

if param.nil?
error_msg += 'You passed nil'
else
error_msg += "You passed a #{param.class.name}"
end

error_msg += param.class.name.to_s
raise InvalidCredentialError, error_msg
end

Expand Down

0 comments on commit 6462a34

Please sign in to comment.