Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise custom error if missing configuration #27

Open
lucascarrias opened this issue Apr 8, 2021 · 1 comment
Open

Raise custom error if missing configuration #27

lucascarrias opened this issue Apr 8, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@lucascarrias
Copy link

This is an improvement suggestion.

How?

  • #push method is called
  • config.json_key_io is nil
  • Some Google's env var is nil

Reference: https://github.com/miyataka/fcmpush#usage

What?

The following error is raised:

NoMethodError:
 undefined method `gsub' for nil:NilClass

Suggestion

Rescue the NoMethodError and raises a custom error with information regarding the missing configuration


Thanks for your time and for the good work.

@miyataka
Copy link
Owner

@lucascarrias Thanks for your suggestion.
That's sounds good. It helps that fcmpush newbie.

@miyataka miyataka added the enhancement New feature or request label Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants