{"record":{"id":"53b8d3cc8ae0980a","repo":"emberjs/ember.js","slug":"this-url","errorCode":null,"errorMessage":"${this.url}","messagePattern":"\\$\\{this\\.url\\}","errorType":"exception","errorClass":"UnrecognizedURLError","httpStatus":null,"severity":"error","filePath":"packages/router_js/lib/transition-intent/url-transition-intent.ts","lineNumber":25,"sourceCode":"import { merge } from '../utils';\n\nexport default class URLTransitionIntent<R extends Route> extends TransitionIntent<R> {\n  preTransitionState?: TransitionState<R>;\n  url: string;\n  constructor(router: Router<R>, url: string, data?: object) {\n    super(router, data);\n    this.url = url;\n    this.preTransitionState = undefined;\n  }\n\n  applyToState(oldState: TransitionState<R>) {\n    let newState = new TransitionState<R>();\n    let results = this.router.recognizer.recognize(this.url),\n      i,\n      len;\n\n    if (!results) {\n      throw new UnrecognizedURLError(this.url);\n    }\n\n    let statesDiffer = false;\n    let _url = this.url;\n\n    // Checks if a handler is accessible by URL. If it is not, an error is thrown.\n    // For the case where the handler is loaded asynchronously, the error will be\n    // thrown once it is loaded.\n    function checkHandlerAccessibility(handler: R) {\n      if (handler && handler.inaccessibleByURL) {\n        throw new UnrecognizedURLError(_url);\n      }\n\n      return handler;\n    }\n\n    for (i = 0, len = results.length; i < len; ++i) {\n      let result = results[i]!;","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/router_js/lib/transition-intent/url-transition-intent.ts#L7-L43","documentation":"URLTransitionIntent.applyToState throws UnrecognizedURLError whose message is just the URL, because the router's recognizer could not match the URL to any defined route. There is no route map entry (including wildcard) matching this path.","triggerScenarios":"router.handleURL('/some/path'), url transitions on initial load, or replaceState/pushState to a path with no matching route definition.","commonSituations":"Deployed app served at a path prefix the router doesn't know (rootURL mismatch); user bookmarked a removed route; server/proxy rewrites stripped a path segment; typo in a redirect target.","solutions":["Add the missing route (or a catch-all this.route('not-found', { path: '*:' }) wildcard) to the router map.","Check rootURL / baseURL configuration matches how the app is served.","Fix the source of the bad URL (redirect, link, server rewrite).","Handle UnrecognizedURLError in a default handler for a friendly 404 page."],"exampleFix":"// before (router map has no match for /legacy-page)\n// after\nthis.route('legacy-page', { path: '/legacy-page' }, function() { this.route('index'); });\n// or a catch-all:\nthis.route('not-found', { path: '*:' });","handlingStrategy":"try-catch","validationCode":"function isKnownPath(router, url) {\n  return router.recognizer.recognize(url) !== undefined; // pre-check like applyToState does\n}\nif (!isKnownPath(router, '/legacy-page')) redirect('/');","typeGuard":"null","tryCatchPattern":"router.handleURL(url).catch(e => {\n  if (e.name === 'UnrecognizedURLError') { router.transitionTo('not-found'); }\n  else throw e;\n});","preventionTips":["Add a wildcard not-found route to the router map.","Verify rootURL/baseURL config against the serving path.","Test deep links to all routes in CI.","Fix or redirect removed paths after refactors."],"tags":["routing","unrecognized-url","ember"],"backgroundTag":"unrecognized-url","analyzedSha":"26f97246a8bf2e28edf26ac3093da2e86c04ffc5","analyzedAt":"2026-09-01T05:01:28.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}