There was an error while loading. Please reload this page.
1 parent fb1b2d5 commit 27b315cCopy full SHA for 27b315c
1 file changed
src/commands/push.ts
@@ -261,10 +261,7 @@ async function removeCustomTypeWithDocumentHandling(
261
}
262
263
function isDocumentsInUseError(error: unknown): error is BadRequestError {
264
- if (!(error instanceof BadRequestError)) return false;
265
- const { body } = error;
266
- return (
267
- typeof body === "string" &&
268
- (body.includes("associated documents") || body.includes("Delete all documents belonging"))
269
- );
+ if (!(error instanceof BadRequestError) || typeof error.body !== "string") return false;
+ const body = error.body.toString();
+ return body.includes("associated documents") || body.includes("Delete all documents belonging");
270
0 commit comments