Skip to content

Commit 3ebe95a

Browse files
committed
fix(discord-bot): fail fast on 401 in getAppByName
1 parent 25b66fe commit 3ebe95a

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

src/client/LicenseChainClient.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,6 @@ class LicenseChainClient {
262262
app.id === appName
263263
);
264264
} catch (error) {
265-
// If API requires auth and fails, try using appName as appId directly
266-
if (error.response?.status === 401) {
267-
console.warn('API authentication failed, trying appName as appId');
268-
// Return a mock app object with the appName as id
269-
return { id: appName, name: appName, slug: appName };
270-
}
271265
throw new Error(`Failed to get app: ${error.response?.data?.message || error.message}`);
272266
}
273267
}

0 commit comments

Comments
 (0)