Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't delete repo with edge #354

Open
sumtsui opened this issue Jul 2, 2023 · 0 comments
Open

Can't delete repo with edge #354

sumtsui opened this issue Jul 2, 2023 · 0 comments

Comments

@sumtsui
Copy link
Contributor

sumtsui commented Jul 2, 2023

Deleting a repo with edge from repo list page will throw error

2023-07-03 06 56 08

{
    "errors": [
        {
            "message": "\nInvalid `prisma.pod.deleteMany()` invocation in\n/app/src/resolver_repo.ts:307:20\n\n  304 });\n  305 if (!repo) throw new Error(\"Repo not found\");\n  306 // 1. delete all pods\n→ 307 await prisma.pod.deleteMany(\nForeign key constraint failed on the field: `Edge_sourceId_fkey (index)`",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": [
                "deleteRepo"
            ],
            "extensions": {
                "code": "INTERNAL_SERVER_ERROR",
                "exception": {
                    "code": "P2003",
                    "clientVersion": "4.3.1",
                    "meta": {
                        "field_name": "Edge_sourceId_fkey (index)"
                    },
                    "stacktrace": [
                        "Error: ",
                        "Invalid `prisma.pod.deleteMany()` invocation in",
                        "/app/src/resolver_repo.ts:307:20",
                        "",
                        "  304 });",
                        "  305 if (!repo) throw new Error(\"Repo not found\");",
                        "  306 // 1. delete all pods",
                        "→ 307 await prisma.pod.deleteMany(",
                        "Foreign key constraint failed on the field: `Edge_sourceId_fkey (index)`",
                        "    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:29909:13)",
                        "    at RequestHandler.request (/app/node_modules/@prisma/client/runtime/index.js:29892:12)",
                        "    at PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:30864:16)",
                        "    at Object.deleteRepo (/app/src/resolver_repo.ts:307:3)"
                    ]
                }
            }
        }
    ],
    "data": {
        "deleteRepo": null
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant