-
Notifications
You must be signed in to change notification settings - Fork 268
Open
Labels
Description
[REQUIRED] Step 2: Describe your environment
- Operating System version: any
- Firebase SDK version: v4
- Library version: current
- Firebase Product: auth
[REQUIRED] Step 3: Describe the problem
Related to #416, a wrapped firebase internal error cannot be introspected
Steps to reproduce:
firebase-admin-go/internal/errors.go
Line 100 in 61c6c04
fe, ok := err.(*FirebaseError) |
Relevant Code:
// err works with errorutils.IsNotFound
_, err := authClient.GetUserByEmail(ctx, "[email protected]")
// errorutils.IsNotFound doesn't work
err = fmt.Errorf("[AuthService] %w")
Solution
Use errors.As instead of a simple typecast. I can open a pull request right away.