I want to have a catch for errors and success for the server.inject method as currently if it throws an error, it is not caught by the function doing the inject, so how would I do that with a function like this
I am using hapi (17.x)
server.inject({
method: 'POST',
url: `/xxx`,
payload: {
x: x
}
});