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

No suitable message for the gcbm/list enpoint when no simulation exist. #130

Open
AayushSaini101 opened this issue Jun 7, 2022 · 4 comments

Comments

@AayushSaini101
Copy link
Contributor

When there is no simulation exists this endpoint returns an empty list with a suitable message. The following is the message.
Message:
{ "data": [], "message": "To create a new simulation, create a request at gcbm/new. To access the results of the existing simulations, create a request at gcbm/download." }

It is bad practice to return an empty list in the response. The following message is optimal in the place of the above message.
{ "message": "No simulations have been run yet. Please run a simulation by making a request to gcbm/new." }

@ayush78781
Copy link

I suppose Aayush gcbm/list endpoint is to return list of existing simulation results. Isn't it?

@AayushSaini101
Copy link
Contributor Author

I suppose Aayush gcbm/list endpoint is to return a list of existing simulation results. Isn't it?

@ayush78781 Yes

@padmajabhol
Copy link
Member

Hi, can you try fetching the list of existing simulations from the docker container, if that is done we can append that to the empty list and update the message.

@clintonMF
Copy link
Contributor

@AayushSaini101 is this issue still opened ? If yes I would like to work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants