-
Notifications
You must be signed in to change notification settings - Fork 64
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
Failure to format api errors #55
Comments
@marcklingen @maxdeichmann Does this need to change? |
Hi @Dev-Khant and @alexcannan, sorry for being late here. This is something i wanted to take a look at, because it woudl definitely increase DX when using the Python library. Some background here:
What are the ways forward?
@alexcannan and @Dev-Khant do you have opinions on that? I just asked Fern in how far the community can use Fern as well. Does anyone of you have experience with generating python code from OpanAPI docs? |
I don't have any experience for generating python code from OpenAPI docs. But I can look into it |
Hmm, I would suggest raising this to the fern developers. It's surprising that their python code generation has Thank you for the detailed explanation @maxdeichmann. It seems as long as no HTTP exceptions are raised, this is a non-issue for users. And, since the SDK is generated directly from API definitions, the chance of exceptions is relatively low. I'm happy to close this for now, since it seems to be a fern generation issue rather than a langfuse one, but I'll leave that up to y'all. |
@alexcannan and @Dev-Khant, thank you so much for looking into this. I agree, this is not very high on our Prio list and hence I will close it. Thanks for raising! |
I'm having trouble trying out langfuse due to some error formatting bad status codes in this block:
langfuse-python/langfuse/api/resources/trace/client.py
Lines 53 to 64 in bcb3cef
httpx.Response.json()
surprisingly returns adict
object, notstr
(meanwhile, it's typed asAny
)https://github.com/encode/httpx/blob/053bc57c3799801ff11273dd393cb0715e63ecf9/httpx/_models.py#L756
pydantic.parse_obj_as(str, _)
to fail:It looks like this pattern is used a lot through the python sdk, I found 110 instances of "
parse_obj_as(str
".The text was updated successfully, but these errors were encountered: