mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
fix: don't swallow fetch errors
Previously, it would just log "fetch failed" without any details about the cause.
This commit is contained in:
parent
cafd6c7c0f
commit
ce7f257d99
2 changed files with 3 additions and 6 deletions
|
|
@ -180,9 +180,7 @@ export class MachineLearningRepository {
|
||||||
`Machine learning request to "${url}" failed with status ${response.status}: ${response.statusText}`,
|
`Machine learning request to "${url}" failed with status ${response.status}: ${response.statusText}`,
|
||||||
);
|
);
|
||||||
} catch (error: Error | unknown) {
|
} catch (error: Error | unknown) {
|
||||||
this.logger.warn(
|
this.logger.warn(`Machine learning request to "${url}" failed`, error);
|
||||||
`Machine learning request to "${url}" failed: ${error instanceof Error ? error.message : error}`,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setHealthy(url, false);
|
this.setHealthy(url, false);
|
||||||
|
|
|
||||||
|
|
@ -122,8 +122,7 @@ export class OAuthRepository {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.error(`OAuth login failed: ${error.message}`);
|
this.logger.error('OAuth login failed', error);
|
||||||
this.logger.error(error);
|
|
||||||
|
|
||||||
throw new Error('OAuth login failed', { cause: error });
|
throw new Error('OAuth login failed', { cause: error });
|
||||||
}
|
}
|
||||||
|
|
@ -222,7 +221,7 @@ export class OAuthRepository {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
} catch (error: any | AggregateError) {
|
} catch (error: any | AggregateError) {
|
||||||
this.logger.error(`Error in OAuth discovery: ${error}`, error?.stack, error?.errors);
|
this.logger.error('Error in OAuth discovery', error);
|
||||||
throw new InternalServerErrorException(`Error in OAuth discovery: ${error}`, { cause: error });
|
throw new InternalServerErrorException(`Error in OAuth discovery: ${error}`, { cause: error });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue