import uuid


def create_base_error(event, context):
    """
    Creates the template for errors that may be returned by the service.
    """
    token = event["endpoint"]["scope"]["token"]

    error_message = {
        "event": {
            "header": {
                "namespace": "Alexa",
                "name": "ErrorResponse",
                "messageId": str(uuid.uuid4()),
                "payloadVersion": "3"
            },
            "endpoint": {
                "scope": {
                    "type": "BearerToken",
                    "token": token
                },
            },
            "payload": {
            }
        }
    }
    return error_message