changesets: added changesets for the new root http router service
Co-authored-by: blam <ben@blam.sh> Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -63,6 +63,9 @@ export const rootHttpRouterFactory = createServiceFactory({
|
||||
|
||||
return {
|
||||
use: (path: string, handler: Handler) => {
|
||||
if (path.match(/^[/\s]*$/)) {
|
||||
throw new Error(`Root router path may not be empty`);
|
||||
}
|
||||
const conflictingPath = findConflictingPath(existingPaths, path);
|
||||
if (conflictingPath) {
|
||||
throw new Error(
|
||||
|
||||
Reference in New Issue
Block a user