firebase / firebase/firebase-admin-java
[FR] Open up FirebaseMessagingException
- Dominant language
- Java
- Stars
- 620
- Forks
- 305
- Avg merge
- 3h 23m
- Merged PRs (30d)
- 1
Description
**Is your feature request related to a problem? Please describe.**
FirebaseMessagingException is final and has package private/private constructors. This prevents using the exception in tests. The firebase recommendation to deal with invalid tokens is to react on error code UNREGISTERED and INVALID_ARGUMENT. In order to test my code that deals with this scenario I would need to create a FirebaseMessagingException with the specified error codes which I can't.
**Describe the solution you'd like**
Open up FirebaseMessagingException to allow instantiation in tests.
Contributor guide
Research direction
Start by locating FirebaseMessagingException and reviewing its constructors and existing tests. Confirm that tests can instantiate exceptions for the UNREGISTERED and INVALID_ARGUMENT error codes while preserving the SDK's intended exception behavior; done when those scenarios are testable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- firebase, java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100