// For parameter validation errors, provide specific error feedback
logConsoleAndDb(`[DeepLink] Invalid parameters for route name ${routeName} for path: ${path}: ${JSON.stringify(error)} ... with params: ${JSON.stringify(params)} ... and query: ${JSON.stringify(query)}`,true);
awaitthis.router.replace({
name:"deep-link-error",
params,
query:{
originalPath: path,
errorCode:"INVALID_PARAMETERS",
errorMessage:`The link parameters are invalid: ${(errorasError).message}`,
...query,
},
});
// This previously threw an error but we're redirecting so there's no need.
return;
}
try{
awaitthis.router.replace({
name: routeName,
params: validatedParams,
query,
query: validatedQuery,
});
}catch(error){
logConsoleAndDb(`[DeepLink] Error routing to route name ${routeName} for path: ${path}: ${JSON.stringify(error)} ... with validated params: ${JSON.stringify(validatedParams)} ... and validated query: ${JSON.stringify(validatedQuery)}`,true);
// For parameter validation errors, provide specific error feedback
awaitthis.router.replace({
name:"deep-link-error",
params: validatedParams,
query:{
originalPath: path,
errorCode:"INVALID_PARAMETERS",
message:`The link parameters are invalid: ${(errorasError).message}`,
errorCode:"ROUTING_ERROR",
errorMessage:`Error routing to ${routeName}: ${(JSON.stringify(error))}`,