undefined

Controllers

Controllers are a great way to cleanly direct the business logic needed to handle requests for a route within your application.

7 Series
35 Lessons
Control panel icon

Discussions

Is there any point in putting try/catch statements in each method of a controller?

@alexys-laurent
@alexys-laurent

I'm using Adonis JS as the API for my application. For each method in my controllers, I add try/catch statements to handle errors and return a response to my front-end in case one occurs. async createDiscussion({ request, auth, response }:...

Showing 1 to 1 of 1 results