hngprojects / hng_boilerplate_golang_web

Apache License 2.0
77 stars 49 forks source link

fix: 404 err handling for fetch all help center topics #290

Closed uloamaka closed 1 month ago

uloamaka commented 1 month ago

Description

Fixed the error handling to properly return 404 error when no topic has been created priorly. ​ API DOC LINK

Related Issue (Link to Github issue)

#270

How Has This Been Tested?

Yes, the test case ensures it return proper error of 404, when there is no help center topics from the DB, while maintain the main functionality of fetch all help center topics if it is present on the DB. ​

Screenshots (if appropriate - Postman, etc):

Screenshot (356)

WHEN NO TOPICS IS PRESENT: Screenshot (355)

WHEN THERE IS A TOPIC Screenshot (354)

Types of changes