properly handling error cases with promise error handlers, sending msg all the way back to client.