The
withSuccessHandler
handles the server error on the client side (in your browser) which won't get the error back to you.
Unless you call the server again from the client side and log an error.
You need something to get an error logged to some place that you have access to, not just that the user sees in the browser.
Most users won't tell you that there is a problem.
You want to know if there is a problem before someone reports it.
If you wait until someone reports an error, then it's too late.
By then people will have already given you a bad rating.
And they'll find a way to give you bad rating, but most people won't make the effort to contact you.
console.log()
on the server side will either log the error to stackdriver or your executions.
Depending upon how you have things set up.