Skip to content

Commit 9ec18b4

Browse files
committed
fix(tg-bot): fail fast on unauthorized app lookup
Remove 401 fallback app fabrication in getAppByName so auth failures surface explicitly. Made-with: Cursor
1 parent 84297fb commit 9ec18b4

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
@@ -326,12 +326,6 @@ class LicenseChainClient {
326326
app.id === appName
327327
);
328328
} catch (error) {
329-
// If API requires auth and fails, try using appName as appId directly
330-
if (error.response?.status === 401) {
331-
console.warn('API authentication failed, trying appName as appId');
332-
// Return a mock app object with the appName as id
333-
return { id: appName, name: appName, slug: appName };
334-
}
335329
throw new Error(`Failed to get app: ${error.response?.data?.message || error.message}`);
336330
}
337331
}

0 commit comments

Comments
 (0)