Spec reviewer caught a systemic gap during Task 6 (navigation) review: Plan 8 left every feature's domain error class with a constructor that didn't set this.name = '<ClassName>'. Plan 9 spec R6 requires it. Fixed across all 10 error files: - auth: AuthenticationError, UnauthenticatedError, UnauthorizedError, InputParseError - blog: ArticleNotFoundError, InputParseError - marketing-pages: PageNotFoundError, InputParseError - navigation: HeaderNotFoundError, InputParseError - media: MediaNotFoundError, InputParseError Functionally a no-op — defineErrorMiddleware uses instanceof, not name — but ensures correct serialization, stack traces, and JSON inspection. Refactor log: §7 Spec: R6
7 lines
172 B
TypeScript
7 lines
172 B
TypeScript
export class InputParseError extends Error {
|
|
constructor(message: string, options?: ErrorOptions) {
|
|
super(message, options);
|
|
this.name = "InputParseError";
|
|
}
|
|
}
|