-
-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid value too long string exceeded 'maxCharBufSize' #2458
Comments
Ah actually we did this for Caliban Client: #2085 |
I'll take a stab at this 👍 What's the right place to start, should I just start to looking for usages of |
So for the quick adapter that would be in |
It looks like doing something like this is fairly simple for the tapir adapters: object MaxCharBufSizeJsonJsoniter extends TapirJsonJsoniter {
override lazy val readerConfig: ReaderConfig =
ReaderConfig
.withAppendHexDumpToParseException(false)
.withMaxCharBufSize(2147483645)
.withMaxBufSize(2147483645)
}
Then just edit the imports. That's strictly speaking different than the way it was solved in the client package, but functionally similar (the buffer size error won't occur unless you send a DVD). Is that an acceptable solution, or do we need to be able to pass options to |
Sounds acceptable! |
Closed by #2459 |
I should probably be able to figure this one out on my own, but I haven't been able to. I'm getting this error for very long strings in graphql requests to my graphql api -- it's simply being returned as a 400 Bad Request. I would like to adjust jsoniters
maxCharBufSize
, which as far as I can tell, can be set inReaderConfig
:https://github.com/plokhotnyuk/jsoniter-scala/blob/master/jsoniter-scala-core/shared/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core/ReaderConfig.scala#L38
I could also provide by own instance to
JsonReader
:https://github.com/plokhotnyuk/jsoniter-scala/blob/master/jsoniter-scala-core/js/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core/JsonReader.scala#L36
Alternatively, perhaps set up caliban to use a different json library, although #2341 makes it seem like the project wants to avoid this in the future.
Is there an easy way to convince caliban to accept strings that are a little longer?
The text was updated successfully, but these errors were encountered: