def METHOD_NAME(data, key: str):
    if data[key]["error"]:
        message = data[key]["error"]["message"]
        if data[key]["error"].get("fields"):
            message += (
                f" {data[key]['error']['fields'][0]['field']}: "
                f"{data[key]['error']['fields'][0]['message']}"
            )
        raise PlainError(message)