You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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" }
The text was updated successfully, but these errors were encountered:
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:
Here is an example JSON response:
The text was updated successfully, but these errors were encountered: