https://kotlinlang.org logo
#ktor
Title
# ktor
t

TheOnlyTails

02/21/2021, 7:30 PM
When I run my Ktor app, I get this message in the log:
Copy code
ERROR ktor.application - Unhandled: GET - /favicon.ico
java.lang.NumberFormatException: For input string: "favicon.ico"
Why is this happening? I never make a GET request for that file.
a

akatkov

02/21/2021, 7:34 PM
Your browser is automatically making that request to show the little icon on tabs that you see
t

TheOnlyTails

02/21/2021, 7:41 PM
How can I fix it (I don't have an HTML file, I use kotlinx.html)
a

akatkov

02/21/2021, 7:46 PM
If you wanted to add an icon, you would serve it as a static asset: https://ktor.io/docs/serving-static-content.html
Otherwise, you'd just need to update your code to not crash on non-numeric input and the icon would be blank
t

TheOnlyTails

02/21/2021, 7:55 PM
It's working! thanks!
👍 1
6 Views