code: private void responseErrorToClient(Exception ex, User user) {
  	    BadRequestException e = getBadRequestException(ex);
  	    if(!e.isSendToClient())    return;
  	    ISFSObject params = new SFSObject();
  	    params.putUtfString(APIKey.MESSAGE, e.getReason());
  	    params.putInt(APIKey.CODE, e.getCode());
  	    send(APIKey.ERROR, params, user);
  	}
docs: Response error to client
  
  @param ex the exception
  @param user the recipient