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:
Patrik Oldsberg
2022-12-29 15:53:23 +01:00
parent 3cf5074903
commit 02b119ff93
4 changed files with 20 additions and 0 deletions
@@ -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(