ensure errors are passed back to client