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

Error handling for get videos #281

Open
2 tasks
bkarimii opened this issue Apr 22, 2024 · 0 comments
Open
2 tasks

Error handling for get videos #281

bkarimii opened this issue Apr 22, 2024 · 0 comments
Assignees
Labels

Comments

@bkarimii
Copy link
Owner

From Full-Stack-Project-Assessment created by Dedekind561: CodeYourFuture/Full-Stack-Project-Assessment#469

Description

You should design your system with error handling in mind. For example if the database cannot be accessed when you call GET /api/videos, then your backend endpoint should return a properly formatted error message with a HTTP 500 error code.

Acceptance criteria

Given a client calls the /api/videos endpoint,
When the server cannot connect to the database ,
Then:

  • The server should respond with a 500 status code
  • The server should respond with a json object indicating the type of error

Here is an example JSON response:

{ "success": false, "error": "Could not connect to the database" }
@github-project-automation github-project-automation bot moved this to 📋 Backlog in FullStackAssessment Apr 22, 2024
@bkarimii bkarimii moved this from 📋 Backlog to 🔖 Ready in FullStackAssessment May 1, 2024
@bkarimii bkarimii moved this from 🔖 Ready to 👀 In review in FullStackAssessment May 1, 2024
@bkarimii bkarimii self-assigned this May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 👀 In review
Development

No branches or pull requests

1 participant