Skip to content
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

Switch error output to JSON #64

Open
rhamzeh opened this issue Jul 8, 2023 · 1 comment
Open

Switch error output to JSON #64

rhamzeh opened this issue Jul 8, 2023 · 1 comment
Labels
enhancement New feature or request on-hold On Hold - Not ready yet

Comments

@rhamzeh
Copy link
Member

rhamzeh commented Jul 8, 2023

Instead of errors like:

$ ./fga store get --store-id invalid-id

failed to initialize FGA Client due to Configuration.StoreId is not a valid ulid

We'd like to expose errors as json, and have the same display as normal output

Screenshot 2023-07-07 at 9 13 21 PM
@rhamzeh rhamzeh added enhancement New feature or request iter-01 First Iteration labels Jul 8, 2023
@rhamzeh rhamzeh added this to the v0.0.1 - Initial Release milestone Jul 8, 2023
@rhamzeh rhamzeh added on-hold On Hold - Not ready yet and removed iter-01 First Iteration labels Jul 11, 2023
@rhamzeh rhamzeh removed this from the v0.1.0 - Initial Release milestone Jul 11, 2023
@Siddhant-K-code
Copy link
Contributor

@rhamzeh Do you have decided on any particular output spec? It could be something like this if it's not required to be nested:

{
  "error": {
    "code": "<ERROR_CODE>",
    "message": "<HUMAN_READABLE_MESSAGE>",
    "details": "<OPTIONAL_DETAILED_MESSAGE>"
  }
}

@rhamzeh rhamzeh moved this to Backlog in SDKs and Tooling Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on-hold On Hold - Not ready yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants