Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[FR]Why does admin.send() return just the response name as error instead of the full response object

Open
#2,693 2 comments 0 reactions 0 assignees View on GitHub

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
Domain
api, backend

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

api: messaging type: feature request

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/firebase-admin-node

All issues in firebase/firebase-admin-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.