[FR]Why does admin.send() return just the response name as error instead of the full response object
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- firebase, node.js, typescript
Research direction
Start at the admin.send() entry point and compare its returned error with the deprecated sendToDevice method and the FirebaseError interface shown in the issue. Determine the response shape needed to expose status, error code, and message; done means callers can identify expired or invalid tokens from the returned response.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
I need to be able handle and cleanup tokens that have expired or are not working for whatever reason. I just migrated from sendToDevice to send and I was surprise that only a string response/error is returned when send is called.
Describe the solution you'd like
A response object that contains status, error code and message
similar to the return type of the now deprecated sendToDevice method
export interface FirebaseError {
code: string;
message: string;
stack?: string;
toJSON(): object;
}
Describe alternatives you've considered
There is no exhaustive list of all the error so there is no way for me to know when to remove expired token from my DB or keep them
Additional context
it is a bit wierd that other methods get a proper error object but send just gets a string error
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 419
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 16
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/firebase-admin-node
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
firebase/firebase-admin-node#3234 ·
Maintainers usually reply within 1 day
-
[email protected] stable dependency tree fails npm audit via Storage uuid and Firestore google-gaxPossibly taken @lahirumaramba claimed this 18 days ago. Open
firebase/firebase-admin-node#3221 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
api: messaging
Difficulty 3/5 1-2 days Newbie friendliness 70/100
firebase/firebase-admin-node#3215 ·
Maintainers usually reply within 1 day
-
api: messaging
Difficulty 5/5 Over a week Newbie friendliness 28/100
firebase/firebase-admin-node#3214 ·
Maintainers usually reply within 1 day
-
[Firestore] Re-export functions from '@google-cloud/firestore/pipelines'May be free again @jonathanedey claimed this 88 days ago, and no pull request is open. Openapi: firestore type: feature request
firebase/firebase-admin-node#3183 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in firebase/firebase-admin-node
Similar issues
-
resources
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
railmapgen/rmg-palette#2445 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
danielmiessler/LifeOS#2242 ·
Maintainers usually reply within 5 days
-
good first issue hacktoberfest help wanted translation
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
callstackincubator/appduct#129 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100