spacecloud-io / space-cloud

Open source Firebase + Heroku to develop, scale and secure serverless apps on Kubernetes
https://space-cloud.io
Apache License 2.0
3.94k stars 222 forks source link

How can we improve error messages? #371

Open HeyItsJs opened 5 years ago

HeyItsJs commented 5 years ago

The problem faced currently

Right now there's now way to know the following:

Also on the client side after triggering a Space API, there is no way to figure out why a request was not successful. A few errors which should be easy to debug and logged in a better way are:

How can we solve it?

SC should be logging what id does at each stage during the init For example:

Space Cloud is a web server with a realtime data access layer and a powerful function mesh

Starting SC in dev mode with 0 projects..
Connecting to databases...
Connected to MongoDB successfully ✔
Could not connect to MySQL ✗
Downloading Mission Control UI....
Extracting Mission Control...
Done

Exposed HTTP APIs on port 4122
Exposed gRPC APIs on port 4124 

Open http://localhost:41222/mission-control to cofigure Space Cloud

Applying new config from Mission control...
Could not connect to MongoDB ✗
Make sure your MongoDB is up and running and its connection string is correct

On the client side, the errors should be more explicit and informative like:

If you want this feature to be implemented, give it a thumbs up reaction, so that we can determine which features are important to you. 👍

YourTechBud commented 5 years ago

We can send status in the following format for gRPC: https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto