Skip to content
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

Update client4:akka-http-backend, ... to 4.0.0-RC1 #275

Merged
merged 2 commits into from
Mar 10, 2025

Conversation

softwaremill-ci
Copy link
Contributor

About this PR

📦 Updates

from 4.0.0-M19 to 4.0.0-RC1

📜 GitHub Release Notes - Version Diff

Usage

Please merge!

I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.

If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.

Configure Scala Steward for your repository with a .scala-steward.conf file.

Have a fantastic day writing Scala!

🔍 Files still referring to the old version number

The following files still refer to the old version number (4.0.0-M19).
You might want to review and update them manually.

examples/src/main/scala/examples/ChatProxy.scala
⚙ Adjust future updates

Add this to your .scala-steward.conf file to ignore future updates of this dependency:

updates.ignore = [ { groupId = "com.softwaremill.sttp.client4" } ]

Or, add this to slow down future updates of this dependency:

dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "com.softwaremill.sttp.client4" }
}]
labels: library-update, early-semver-pre-release, semver-spec-pre-release, old-version-remains, commit-count:1

@zygiert1990 zygiert1990 force-pushed the update/akka-http-backend-4.0.0-RC1 branch from 063f729 to d9bb41f Compare March 10, 2025 09:05
@github-actions github-actions bot merged commit 1bcb808 into master Mar 10, 2025
9 checks passed
@github-actions github-actions bot deleted the update/akka-http-backend-4.0.0-RC1 branch March 10, 2025 09:08
@@ -78,7 +77,7 @@ object CompletionsRequestBody {
SnakePickle.read[ujson.Value](jsonValue) match {
case Str(value) =>
byCompletionModelValue.getOrElse(value, CustomCompletionModel(value))
case e => throw DeserializationOpenAIException(new Exception(s"Could not deserialize: $e"))
case e => throw new Exception(s"Could not deserialize: $e")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zygiert1990 shouldn't we throw DeserializationException here or the DeserializationOpenAIException wrapper?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly how does it work I think not. In SttpUpickleApiExtension we have method deserializeJsonSnake, which actually does the deserialization. Inside this method there is try-catch block and it works in that way that it catches all exceptions and wraps them in DeserializationOpenAIException. Having this in mind I changed exception type in all implicit readers, as eventually they will be wrapped into another exception.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so it would be wrapped twice in effect?

By the way, do we still need DeserializationOpenAIException? Can't we just use DeserializationException?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes indeed.

We could remove DeserializationOpenAIException, but we have such or similar signature in some methods Request[Either[OpenAIException, AudioResponse]]. If we remove this error we will have to adapt existing code (as we won't be able to use OpenAIException, as a base type here), which of course shouldn't be a problem, but the question is: does it bring to us any value? Doing so, we will break existing error hierarchy, as there are few others custom exceptions in this project, e.g. RateLimitException, which are also a subtypes of OpenAIException.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sounds reasonable, so we leave things as-is :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants