-
Notifications
You must be signed in to change notification settings - Fork 391
Missing GrpcStatus in firestore #1064
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
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
@hiranya911 - I think this is missing here https://github.com/firebase/firebase-admin-node/blob/master/src/firestore/index.ts#L59 |
We already add everything exported by > const admin = require('firebase-admin')
> admin.firestore.GrpcStatus
{ '0': 'OK',
'1': 'CANCELLED',
'2': 'UNKNOWN',
'3': 'INVALID_ARGUMENT',
'4': 'DEADLINE_EXCEEDED',
'5': 'NOT_FOUND',
'6': 'ALREADY_EXISTS',
'7': 'PERMISSION_DENIED',
'8': 'RESOURCE_EXHAUSTED',
'9': 'FAILED_PRECONDITION',
'10': 'ABORTED',
'11': 'OUT_OF_RANGE',
'12': 'UNIMPLEMENTED',
'13': 'INTERNAL',
'14': 'UNAVAILABLE',
'15': 'DATA_LOSS',
'16': 'UNAUTHENTICATED',
OK: 0,
CANCELLED: 1,
UNKNOWN: 2,
INVALID_ARGUMENT: 3,
DEADLINE_EXCEEDED: 4,
NOT_FOUND: 5,
ALREADY_EXISTS: 6,
PERMISSION_DENIED: 7,
RESOURCE_EXHAUSTED: 8,
FAILED_PRECONDITION: 9,
ABORTED: 10,
OUT_OF_RANGE: 11,
UNIMPLEMENTED: 12,
INTERNAL: 13,
UNAVAILABLE: 14,
DATA_LOSS: 15,
UNAUTHENTICATED: 16 } Do you mean we should also add it to our typings? |
@Thaina when you say error, do you mean a TS compiler error? That's the only error I can see resulting from the above code. |
@hiranya911 Yes, sorry for not being clear. It is compiler error I have searching for enum code in this repo and only found it defined in remote config https://github.com/firebase/firebase-admin-node/search?q=ALREADY_EXISTS I think typescript try to find definition in this package directly and it couldn't found |
We need to re-export the corresponding Firestore enum from our d.ts file. We can get that fixed in a future release. |
Uh oh!
There was an error while loading. Please reload this page.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
I try to check a status code of firestore error without hardcode symbol and turn out GrpcStatus which exist in js firestore package are not exist in
admin.firestore
for node jsShould there be anything defined for firestore error code?
The text was updated successfully, but these errors were encountered: