def exception_response(status_code, **kw):
 exc = status_map[status_code](**kw)
 return exc

def exception_response ( status_code , ** kw ) : exc = status_map [ status_code ] ( ** kw ) return exc
creates an http exception based on a status code .