refactor(types): improve type safety and eliminate type assertions

- Replace type assertions with proper type guards in ProfileService
- Add isAxiosError type guard and improve error handling
- Clean up formatting and improve type safety in deepLinks service
- Remove type assertions in AccountViewView Vue component
- Improve code formatting and consistency across services
This commit is contained in:
Matthew Raymer
2025-08-19 03:37:20 +00:00
parent bc1214e9db
commit 9384f0083a
3 changed files with 84 additions and 41 deletions

View File

@@ -199,8 +199,10 @@ export class DeepLinkHandler {
}
// Continue with parameter validation as before...
const pathSchema = deepLinkPathSchemas[path as keyof typeof deepLinkPathSchemas];
const querySchema = deepLinkQuerySchemas[path as keyof typeof deepLinkQuerySchemas];
const pathSchema =
deepLinkPathSchemas[path as keyof typeof deepLinkPathSchemas];
const querySchema =
deepLinkQuerySchemas[path as keyof typeof deepLinkQuerySchemas];
let validatedPathParams: Record<string, string> = {};
let validatedQueryParams: Record<string, string> = {};
@@ -235,7 +237,7 @@ export class DeepLinkHandler {
await this.router.replace({
name: routeName,
params: validatedPathParams,
query: validatedQueryParams
query: validatedQueryParams,
});
} catch (error) {
logger.error(