This repository was archived by the owner on Jun 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,21 +40,21 @@ function handleRequest(req: Request, res: Response) {
4040
4141 // Get normalized patterns to handle both trailing slash cases
4242 const patterns = normalizeCustomHandlerPattern ( attr . value ) ;
43- let match = null ;
43+ let match : RegExpMatchArray | null = null ;
4444
45- // Try each pattern until we find a match
46- for ( const pattern of patterns ) {
47- try {
45+ try {
46+ // Try each pattern until we find a match
47+ for ( const pattern of patterns ) {
4848 const regex = new RegExp ( `^${ pattern } $` ) ;
4949 match = path . match ( regex ) ;
5050 if ( match ) {
5151 break ; // Found a match, exit pattern loop
5252 }
53- } catch ( e : unknown ) {
54- const [ errMessage , errStack ] = safeExtractMessageAndStackFromError ( e ) ;
55- log . error ( `Testing path for label '${ attr . attributeId } ', regex '${ pattern } ' failed with error: ${ errMessage } , stack: ${ errStack } ` ) ;
56- continue ;
5753 }
54+ } catch ( e : unknown ) {
55+ const [ errMessage , errStack ] = safeExtractMessageAndStackFromError ( e ) ;
56+ log . error ( `Testing path for label '${ attr . attributeId } ', regex '${ attr . value } ' failed with error: ${ errMessage } , stack: ${ errStack } ` ) ;
57+ continue ;
5858 }
5959
6060 if ( ! match ) {
You can’t perform that action at this time.
0 commit comments