firebase / firebase/firebase-js-sdk

[Feature Request] Include document path in permissions errors

Open
#7,160 10 comments 3 reactions 1 assignee Claimed by @dconeybe View on GitHub
api: firestore feature request
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

### [REQUIRED] Describe your environment

* Operating System version: OS X
* Browser version: Chrome
* Firebase SDK version: (all)
* Firebase Product: Firestore

### [REQUIRED] Describe the problem

#### Steps to reproduce:

This is a feature request, so apologies for abusing the template. It would be incredibly helpful if the "Missing or insufficient permissions." error thrown by the Firestore SDK had some information on what request failed. I realize for queries this might be difficult but for simple document CRUD operations, it would be great if the error object included the document path.

Firestore is incredibly reliable so most developers are not in the habit of adding `try/catch` around most simple operations. This means when you do get an accidental error like a rules failure, it may not be caught locally and when you see the error in your app metrics it may be lacking all context. So I'd love for the Firestore SDK to help me carry that context.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.