You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 18, 2019. It is now read-only.
Hi,
I'm using hapi version ^17.2.1 and I have a problem because I get an error in route handler:
Debug: internal, implementation, error
Error: handler method did not return a value, a promise, or throw an error
I am using MySQL database. So when I'm sending a query to the database and getting the result from the database. Using console.log, it is getting printed in the console but since I'm returning the result there itself within the query as a response it is not returning anything from the main handler function(case-1). Storing the result from the database in a new variable outside scope of query function and returning it as a response outside query function doesn't help either (case-2), it just returns a blank response.
Hi,
I'm using hapi version ^17.2.1 and I have a problem because I get an error in route handler:
Debug: internal, implementation, error
Error: handler method did not return a value, a promise, or throw an error
I am using MySQL database. So when I'm sending a query to the database and getting the result from the database. Using console.log, it is getting printed in the console but since I'm returning the result there itself within the query as a response it is not returning anything from the main handler function(case-1). Storing the result from the database in a new variable outside scope of query function and returning it as a response outside query function doesn't help either (case-2), it just returns a blank response.
case-1
`server.route(
});`
case-2
`server.route(
});`
Can someone help me out in this how can I return a response from server within the query function or using any other method?
The text was updated successfully, but these errors were encountered: