Skip to content

Commit

Permalink
Added temporary logging to investigate Kir-Antipov#69
Browse files Browse the repository at this point in the history
  • Loading branch information
Kir-Antipov committed May 30, 2023
1 parent 939497b commit f161000
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/platforms/curseforge/curseforge-upload-api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { MINECRAFT_VERSION_PROVIDER } from "@/games/minecraft";
import { retry } from "@/utils/async-utils";
import { isHttpError } from "@/utils/errors";
import { JavaVersion } from "@/utils/java";
import { getDefaultLogger } from "@/utils/logging";
import { Fetch, HttpRequest, createFetch, simpleCache, throwOnError } from "@/utils/net";
import { CurseForgeError, getInvalidProjectSlug, isCurseForgeError, isInvalidGameVersionIdCurseForgeError, isInvalidProjectSlugCurseForgeError } from "./curseforge-error";
import { CurseForgeFile, CurseForgeFileInit } from "./curseforge-file";
Expand Down Expand Up @@ -259,6 +260,10 @@ async function tryHandleUploadError(error: Error, file: CurseForgeFileInit): Pro
}

if (isInvalidGameVersionIdCurseForgeError(errorObject)) {
// _ TODO: Add proper debug logging here.
const logger = getDefaultLogger();
logger.warn(`W.I.P. CurseForge rejected these game versions: [${file?.game_versions?.join(", ")}]. ${error}`);

return handleInvalidGameVersionIdCurseForgeError(file);
}

Expand Down

0 comments on commit f161000

Please sign in to comment.