This implementation handles errors in the API functions.
Description :
This PR implements enhance Error handling in API functions.
@anirbanpaulcom is attempting to deploy a commit to the Dub Team on Vercel.
A member of the Team first needs to authorize it.
@anirbanpaulcom Have you considered moving the handleAndReturnErrorResponse to the withAdmin method so that you don't have to add a try catch block in each API handler? What do you think?
@anirbanpaulcom Have you considered moving the
handleAndReturnErrorResponseto thewithAdminmethod so that you don't have to add atry catchblock in each API handler? What do you think?
Yes @devkiran, is there any problem? Do i need to change anything?
@anirbanpaulcom Let's move the error handling logic to withAdmin, so we don't have to repeat that on route level.
@anirbanpaulcom Let's move the error handling logic to
withAdmin, so we don't have to repeat that on route level.
@devkiran , Done. Anything else?
Thanks for your contribution! I think these changes not necessary right now. I'm closing this PR.