We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
verison: 0.4.2.1
import software.amazon.awssdk.regions.Region import software.amazon.awssdk.services.s3.S3Client import software.amazon.awssdk.services.s3.model._ import zio._ import zio.s3.getObject import zio.stream.ZStream object Test1 extends ZIOAppDefault { override def run: ZIO[Any with ZIOAppArgs with Scope, Throwable, Unit] = { val bucketName = "cassandra-dev" val key = "not-exist-key" def awsGetObject() = { val region = Region.CN_NORTHWEST_1 val client = S3Client.builder.region(region).build val request = GetObjectRequest .builder() .bucket(bucketName) .key(key) .build() try { client.getObject(request) } catch { case e: S3Exception => println("aws sdk return code:" + e.statusCode()) } } awsGetObject() getObject(bucketName, key).catchAll { e => println("zio s3 return code:" + e.statusCode()) ZStream.fromIterable(Array[Byte]()) }.runDrain.provideLayer(layer.all) } }
output:
aws sdk return code:404 zio s3 return code:0
It should return 404 rather than 0.
It seems that the builder not init correctly?
zio-s3/src/main/scala/zio/s3/Live.scala
Lines 69 to 74 in d90f823
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
verison: 0.4.2.1
output:
It should return 404 rather than 0.
It seems that the builder not init correctly?
zio-s3/src/main/scala/zio/s3/Live.scala
Lines 69 to 74 in d90f823
The text was updated successfully, but these errors were encountered: