def METHOD_NAME(
    response: lib.Element,
    settings: provider_utils.Settings,
) -> models.Message:
    if (
        str(response.tag).endswith("data")
        and response.get("code") is not None
        and response.get("code") != "0"
    ):
        return [
            models.Message(
                carrier_id=settings.carrier_id,
                carrier_name=settings.carrier_name,
                message=response.get("error"),
                code=response.get("code"),
            )
        ]
    return []