fix(gitea): prevent mcp server crash if token is missing
This commit is contained in:
@@ -17,8 +17,7 @@ const GITEA_HOST = process.env.GITEA_HOST || "https://git.infra.mintel.me";
|
|||||||
const GITEA_ACCESS_TOKEN = process.env.GITEA_ACCESS_TOKEN;
|
const GITEA_ACCESS_TOKEN = process.env.GITEA_ACCESS_TOKEN;
|
||||||
|
|
||||||
if (!GITEA_ACCESS_TOKEN) {
|
if (!GITEA_ACCESS_TOKEN) {
|
||||||
console.error("Error: GITEA_ACCESS_TOKEN environment variable is required");
|
console.error("Warning: GITEA_ACCESS_TOKEN environment variable is missing. Pipeline tools will return unauthorized errors.");
|
||||||
process.exit(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const giteaClient = axios.create({
|
const giteaClient = axios.create({
|
||||||
|
|||||||
Reference in New Issue
Block a user