refactor: attempt to fix ip forwarding issue with more logging

This commit is contained in:
fallenbagel
2024-06-13 00:50:01 +05:00
parent 9aeb3604e6
commit 166796804e

View File

@@ -133,6 +133,11 @@ class JellyfinAPI extends ExternalAPI {
}
: {};
logger.debug(`Logging in to Jellyfin server: ${this.jellyfinHost}`, {
label: 'Jellyfin API',
clientIp: ClientIP,
});
const authResponse = await this.post<JellyfinLoginResponse>(
'/Users/AuthenticateByName',
{
@@ -146,6 +151,12 @@ class JellyfinAPI extends ExternalAPI {
return authResponse;
} catch (e) {
logger.error('Failed to login to Jellyfin server', {
label: 'Jellyfin API',
clientIp: ClientIP,
error: e,
});
const status = e.response?.status;
const networkErrorCodes = new Set([