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.

Unprocessable Entity (422) when uploading file with non-English name

See original GitHub issue

With the following code:

import cats.effect._
import org.http4s._
import org.http4s.dsl.io._
import org.http4s.multipart._

object TestService {
  val service = HttpService[IO] {
    case req @ POST -> Root / "test" =>
      req.decode[Multipart[IO]](_ => Ok("Done"))
  }
}

I tried Thai, Japanese and Chinese file names. The server always return HTTP 422. English names work fine though. Example names that fail: ทดสอบ, テスト and 实验.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jmcardoncommented, Apr 4, 2018

I think utf8 as a default is ok. Seems like everyone else is ignoring that part of the rfc…

0reactions
tenniscp25commented, Apr 5, 2018

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unprocessable Entity (422) when uploading file with non ...
I tried Thai, Japanese and Chinese file names. The server always return HTTP 422. English names work fine though. Example names that fail:...
Read more >
422 Unprocessable Entity - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 422 Unprocessable Entity response status code indicates that the server understands the content type ...
Read more >
422 Unprocessable Entity when file with same name exists ...
Basically this works fine, but if I upload an image with a filename, which already exists I get an error: 422 Unprocessable Entity....
Read more >
Why do I get an "Unprocessable Entity" error while uploading ...
The problem is that your route is expecting 2 types of request body: request: schemas.Item. This is expecting POSTing an application/json ...
Read more >
How To Fix the HTTP 422 Error - Kinsta
Error 422 is an HTTP code that tells you that the server can't process your request, although it understands it. The full name...
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