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

Menambahkan global error handler #10

Open
1 of 2 tasks
NurfitraPujo opened this issue Dec 10, 2021 · 1 comment · Fixed by #11
Open
1 of 2 tasks

Menambahkan global error handler #10

NurfitraPujo opened this issue Dec 10, 2021 · 1 comment · Fixed by #11
Assignees
Labels
blocked Penyelesaian fitur / issue terblokir oleh issue lain enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@NurfitraPujo
Copy link
Member

NurfitraPujo commented Dec 10, 2021

Deskripsi
Kita perlu menambahkan beberapa middleware umum untuk menghandle kasus-kasus jika terjadi error pada api. Hal ini untuk menjaga agar jika sewaktu-waktu ada error yang tidak kita handle maka express dapat mengembalikan response yang sesuai dan tidak "hang".

Tugas-tugas

  • Menambahkan "catch-all" error handler (sebagai handler terakhir jika tidak ada handler lain yang bisa menghandle error)
  • Menambahkan validation middleware (menghandle validasi data dan handle jika error)

Referensi
Express error handling

@NurfitraPujo NurfitraPujo added enhancement New feature or request good first issue Good for newcomers labels Dec 10, 2021
@NurfitraPujo NurfitraPujo added this to the MVP milestone Dec 10, 2021
@NurfitraPujo NurfitraPujo self-assigned this Dec 10, 2021
@NurfitraPujo NurfitraPujo added the blocked Penyelesaian fitur / issue terblokir oleh issue lain label Dec 13, 2021
@NurfitraPujo
Copy link
Member Author

Terblokir untuk sementara waktu, middleware untuk validasi menunggu issue #6 resolve

@NurfitraPujo NurfitraPujo linked a pull request Dec 20, 2021 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Penyelesaian fitur / issue terblokir oleh issue lain enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant