def error_status(e):
    """Return the HTTP status code associated with an exception"""
    codes = {'ZoomError': 400, 'ValueError': 400, 'RuntimeError': 500,
        'UnicodeDecodeError': 500}
    name = e.__class__.__name__
    if name not in codes.keys():
        return 500
    return codes[name]
