import json


def http500(msg):
    """
    Create the result payload for a 500 error.
    """
    if not msg:
        msg = "Internal server error"
    ret = json.dumps({"success": False, "message": msg}, indent=2)
    return (ret, 500, {'Content-length': len(ret), 'Content-Type': 'application/json'})