question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Paths cannot contain `:`

See original GitHub issue

Actual behavior (the bug) app.get("/path/to/resource:action")

Exception in thread “main” java.lang.IllegalArgumentException: Path ‘/path/to/resource:action’ invalid - Javalin 4 switched from ‘:param’ to ‘{param}’

Expected behavior A handler to be registered at the path /path/to/resource:action

To Reproduce See “Actual behavior (the bug)”

Additional context PathParser.kt seems to specifically check for this character and throw the exception, apparently in an attempt to warn people of changed behavior. This unfortunately interferes with what I think ought to be acceptable handler registration.

        if (rawPath.contains(":")) {
            throw IllegalArgumentException("Path '$rawPath' invalid - Javalin 4 switched from ':param' to '{param}'.")
        }

While I understand the desire to make life a little easier in migration situations, I don’t think that should interfere with the future in this way.

By way of example, here’s a documented use-case for a : within a URL path https://cloud.google.com/apis/design/custom_methods

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ptomlicommented, Dec 8, 2021

Turns out setting that up wasn’t as time consuming as I had expected. Kotlin isn’t my traditional stomping ground

0reactions
tipsycommented, Dec 8, 2021

Turns out setting that up wasn’t as time consuming as I had expected.

Happy to hear that !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cookie paths cannot contain any of the following ',; \t\r\n\013\014'
My local website version in wampserver displays the following error upon logging in: Warning: Cookie paths cannot contain any…
Read more >
CodeIgniter --> Cookie paths cannot contain any of the following
CodeIgniter --> Cookie paths cannot contain any of the following ',; \t\r\n\013\014' /xxxxx/system/libraries/Session/Session. php 170 - Stack ...
Read more >
"Path Name Error" Paths cannot contain "|" symbol
When trying to access the images in C1 I get an error message - capture One pro "Path Name Error" Paths cannot contain...
Read more >
Cookie paths cannot contain any of the following ',; \t\r\n\013 ...
Prerequisites I have searched for similar issues in both open and closed tickets and cannot find a duplicate The issue still exists against ......
Read more >
Sink dataset filepaths cannot contain a file name. - Azure data ...
... try restarting your device. Your browser can't play this video. ... Solved - ADF - Sink dataset filepaths cannot contain a file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found