CodeYourFuture / CodeYourFuture/Full-Stack-Project-Assessment

Error handling for get videos

オープン
#469 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
🏝️ Priority Stretch 📅 Week 1 🔌 Backend
主要言語
JavaScript
スター
9
フォーク
352
PR マージ指標
30日以内にマージされた PR はありません

説明

## 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:
```json
{ "success": false, "error": "Could not connect to the database" }
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。