performance-optimizations-testing #159

Open
anomalist wants to merge 132 commits from performance-optimizations-testing into build-improvement
Showing only changes of commit 8db07465ed - Show all commits

View File

@@ -261,13 +261,31 @@ export class ProfileService {
if (this.isAxiosError(error)) {
return error.config?.url;
}
if (this.isApiError(error) && (error as any).config) {
const config = (error as any).config as { url?: string };
return config.url;
if (this.isApiError(error) && this.hasConfigProperty(error)) {
const config = this.getConfigProperty(error);
return config?.url;
}
return undefined;
}
/**
* Type guard to check if error has config property
*/
private hasConfigProperty(
error: unknown,
): error is { config?: { url?: string } } {
return typeof error === "object" && error !== null && "config" in error;
}
/**
* Safely extract config property from error
*/
private getConfigProperty(error: {
config?: { url?: string };
}): { url?: string } | undefined {
return error.config;
}
/**
* Type guard for AxiosError
*/