<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dbsExceptionHandler(eCode='', message='', logger=None , serverError=''):
 """ This utility function handles all dbs exceptions. It will log , raise exception based on input condition. It loggs the traceback on the server log. Send HTTPError 400 for invalid client input and HTTPError 404 for NOT FOUND required pre-existing condition. """

    if  logger:
	#HTTP Error
        if eCode == "dbsException-invalid-input":
            #logger(eCode + ": " + serverError)
            raise HTTPError(400, message)
        elif eCode == "dbsException-missing-data":
            logger( time.asctime(time.gmtime()) + " " + eCode + ": " +  serverError)
            #print (eCode + ": " +  serverError)
            raise HTTPError(412, message)
        elif eCode == "dbsException-input-too-large":
            logger(time.asctime(time.gmtime()) + " " + eCode + ": " +  serverError)
            raise HTTPError(413, message)
        elif eCode == "dbsException-invalid-input2":
            logger( time.asctime(time.gmtime()) + " " + eCode + ": " +  serverError)
            raise HTTPError(400, message)
        elif eCode == "dbsException-conflict-data":
            logger( time.asctime(time.gmtime()) + " " + eCode + ": " +  serverError)
            raise HTTPError(409, message)
	elif eCode == "dbsException-failed-connect2host":
	    logger( time.asctime(time.gmtime()) + " " + eCode + ": " +  serverError)
	    raise HTTPError(443, message)	
        else:
            #client gets httperror 500 for server internal error
            #print eCode + ": " +  serverError
            logger( time.asctime(time.gmtime()) + " " + eCode + ": " +  serverError)
            raise HTTPError(500, message)
    else:
        #not HTTP Error
        raise dbsException(eCode, message, serverError)