You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error, status code: 413, message: invalid character '<' looking for beginning of value
OK, what is it all about? Is 413 an HTTP status code? where did '<' come from?
So I started to investigate, yep, 413 is an HTTP status code, but the error comes after it message: invalid character '<' looking for beginning of value, has nothing about the 413, and comes from json package which expects a json response.
it's a little bit confusing.
logging the error inside handleErrorResp method ([email protected]/client.go:259):
<html><head><title>413 Request Entity Too Large</title></head><body><center><h1>413 Request Entity Too Large</h1></center><hr><center>nginx</center></body></html>
Expected behavior
I expected handleErrorResp returns a clear error like Request Entity Too Large before it tries to unmarshal an HTML, leading to a wrong second error.
Environment (please complete the following information):
go-openai version: v1.26.0
Go version: v1.21.0
OpenAI API version: v1
OS: macOS
Additional context
I don't exactly remember but I think I had the same issue with rate limit related errors earlier.
The text was updated successfully, but these errors were encountered:
Describe the bug
Trying to transcribe an mp3 file which happens to be larger than expected, using the snippet below:
the code returns this error:
OK, what is it all about? Is 413 an HTTP status code? where did '<' come from?
So I started to investigate, yep, 413 is an HTTP status code, but the error comes after it
message: invalid character '<' looking for beginning of value
, has nothing about the 413, and comes from json package which expects a json response.it's a little bit confusing.
logging the error inside handleErrorResp method (
[email protected]/client.go:259
):Expected behavior
I expected handleErrorResp returns a clear error like
Request Entity Too Large
before it tries to unmarshal an HTML, leading to a wrong second error.Environment (please complete the following information):
Additional context
I don't exactly remember but I think I had the same issue with rate limit related errors earlier.
The text was updated successfully, but these errors were encountered: