Skip to content

Commit a89bdeb

Browse files
morealclaude
andcommitted
Fix RouteError references to RouterError
- JSDoc comments incorrectly referenced RouteError but the actual error class is RouterError - Renamed throwRouteError() helper functions to throwRouterError() to match the error class they throw 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 12531f8 commit a89bdeb

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

packages/fedify/src/federation/context.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export interface Context<TContextData> {
116116
* @param cls The class of the object.
117117
* @param values The values to pass to the object dispatcher.
118118
* @returns The object's URI.
119-
* @throws {RouteError} If no object dispatcher is available for the class.
119+
* @throws {RouterError} If no object dispatcher is available for the class.
120120
* @throws {TypeError} If values are invalid.
121121
* @since 0.7.0
122122
*/
@@ -429,7 +429,7 @@ export interface Context<TContextData> {
429429
* @param name The name of the collection, which can be a string or a symbol.
430430
* @param values The values of the URI parameters.
431431
* @return The URI of the collection.
432-
* @throws {RouteError} If no object dispatcher is available for the name.
432+
* @throws {RouterError} If no object dispatcher is available for the name.
433433
* @throws {TypeError} If values are invalid.
434434
* @since 1.8.0
435435
*/

packages/fedify/src/federation/federation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ export interface Federatable<TContextData> {
468468
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
469469
* The path must have no variables.
470470
* @returns An object to register inbox listeners.
471-
* @throws {RouteError} Thrown if the path pattern is invalid.
471+
* @throws {RouterError} Thrown if the path pattern is invalid.
472472
*/
473473
setInboxListeners(
474474
inboxPath:

packages/fedify/src/testing/context.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function createContext<TContextData>(
5050
sendActivity,
5151
routeActivity,
5252
} = values;
53-
function throwRouteError(): URL {
53+
function throwRouterError(): URL {
5454
throw new RouterError("Not implemented");
5555
}
5656
return {
@@ -64,17 +64,17 @@ export function createContext<TContextData>(
6464
contextLoader: contextLoader ?? mockDocumentLoader,
6565
tracerProvider: tracerProvider ?? trace.getTracerProvider(),
6666
clone: clone ?? ((data) => createContext({ ...values, data })),
67-
getNodeInfoUri: getNodeInfoUri ?? throwRouteError,
68-
getActorUri: getActorUri ?? throwRouteError,
69-
getObjectUri: getObjectUri ?? throwRouteError,
70-
getCollectionUri: getCollectionUri ?? throwRouteError,
71-
getOutboxUri: getOutboxUri ?? throwRouteError,
72-
getInboxUri: getInboxUri ?? throwRouteError,
73-
getFollowingUri: getFollowingUri ?? throwRouteError,
74-
getFollowersUri: getFollowersUri ?? throwRouteError,
75-
getLikedUri: getLikedUri ?? throwRouteError,
76-
getFeaturedUri: getFeaturedUri ?? throwRouteError,
77-
getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouteError,
67+
getNodeInfoUri: getNodeInfoUri ?? throwRouterError,
68+
getActorUri: getActorUri ?? throwRouterError,
69+
getObjectUri: getObjectUri ?? throwRouterError,
70+
getCollectionUri: getCollectionUri ?? throwRouterError,
71+
getOutboxUri: getOutboxUri ?? throwRouterError,
72+
getInboxUri: getInboxUri ?? throwRouterError,
73+
getFollowingUri: getFollowingUri ?? throwRouterError,
74+
getFollowersUri: getFollowersUri ?? throwRouterError,
75+
getLikedUri: getLikedUri ?? throwRouterError,
76+
getFeaturedUri: getFeaturedUri ?? throwRouterError,
77+
getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouterError,
7878
parseUri: parseUri ?? ((_uri) => {
7979
throw new Error("Not implemented");
8080
}),

packages/testing/src/context.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function createContext<TContextData>(
7676
sendActivity,
7777
routeActivity,
7878
} = values;
79-
function throwRouteError(): URL {
79+
function throwRouterError(): URL {
8080
throw new RouterError("Not implemented");
8181
}
8282
return {
@@ -90,17 +90,17 @@ function createContext<TContextData>(
9090
contextLoader: contextLoader ?? mockDocumentLoader,
9191
tracerProvider: tracerProvider ?? noopTracerProvider,
9292
clone: clone ?? ((data) => createContext({ ...values, data })),
93-
getNodeInfoUri: getNodeInfoUri ?? throwRouteError,
94-
getActorUri: getActorUri ?? throwRouteError,
95-
getObjectUri: getObjectUri ?? throwRouteError,
96-
getCollectionUri: getCollectionUri ?? throwRouteError,
97-
getOutboxUri: getOutboxUri ?? throwRouteError,
98-
getInboxUri: getInboxUri ?? throwRouteError,
99-
getFollowingUri: getFollowingUri ?? throwRouteError,
100-
getFollowersUri: getFollowersUri ?? throwRouteError,
101-
getLikedUri: getLikedUri ?? throwRouteError,
102-
getFeaturedUri: getFeaturedUri ?? throwRouteError,
103-
getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouteError,
93+
getNodeInfoUri: getNodeInfoUri ?? throwRouterError,
94+
getActorUri: getActorUri ?? throwRouterError,
95+
getObjectUri: getObjectUri ?? throwRouterError,
96+
getCollectionUri: getCollectionUri ?? throwRouterError,
97+
getOutboxUri: getOutboxUri ?? throwRouterError,
98+
getInboxUri: getInboxUri ?? throwRouterError,
99+
getFollowingUri: getFollowingUri ?? throwRouterError,
100+
getFollowersUri: getFollowersUri ?? throwRouterError,
101+
getLikedUri: getLikedUri ?? throwRouterError,
102+
getFeaturedUri: getFeaturedUri ?? throwRouterError,
103+
getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouterError,
104104
parseUri: parseUri ?? ((_uri) => {
105105
throw new Error("Not implemented");
106106
}),

0 commit comments

Comments
 (0)