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

Empty S3Exception #1589

Closed
francisdb opened this issue Mar 18, 2019 · 2 comments
Closed

Empty S3Exception #1589

francisdb opened this issue Mar 18, 2019 · 2 comments
Labels
Milestone

Comments

@francisdb
Copy link
Contributor

Alpakka version: 1.0-M3

Expected Behavior

If S3 responds with an empty response (because of empty string key/secret). I would expect a useful error message but you get an empty S3Exception

Actual Behavior

Caused by: akka.stream.alpakka.s3.S3Exception:
	at akka.stream.alpakka.s3.impl.S3Stream$.$anonfun$getObjectMetadata$7(S3Stream.scala:174)
	at scala.util.Success.$anonfun$map$1(Try.scala:255)
	at scala.util.Success.map(Try.scala:213)
	at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
	at akka.http.scaladsl.util.FastFuture$FulfilledFuture.transform(FastFuture.scala:84)
	at scala.concurrent.Future.map(Future.scala:292)
	at scala.concurrent.Future.map$(Future.scala:292)
	at akka.http.scaladsl.util.FastFuture$FulfilledFuture.map(FastFuture.scala:77)
	at akka.stream.alpakka.s3.impl.S3Stream$.$anonfun$getObjectMetadata$4(S3Stream.scala:173)
	at akka.stream.impl.fusing.Map$$anon$1.onPush(Ops.scala:52)
	at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:515)
	at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:478)
	at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:374)
	at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:588)
	at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:474)
	at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:563)
	at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:730)
	at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$shortCircuitBatch(ActorGraphInterpreter.scala:720)
	at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:746)

Related tickets

There are related issues:

#731 (xml parse of empty body)
#731 (similar with wrong fix?)

Reproducible Test Case

Just provide an empty key ans secret to the S3Settings and try getObjectMetadata

Preferably it would check/show the http response status if it's not 200 / if it encounters an empty body so that the user at least has a clue what the source of this error might be.

@ennru
Copy link
Member

ennru commented Mar 19, 2019

Thank you for reporting, it would be perfect if you could prepare a PR to fix it.

@ennru ennru added the p:aws-s3 label Mar 19, 2019
MarcinAman added a commit to MarcinAman/alpakka that referenced this issue Jun 11, 2019
MarcinAman added a commit to MarcinAman/alpakka that referenced this issue Jun 11, 2019
MarcinAman added a commit to MarcinAman/alpakka that referenced this issue Jun 11, 2019
MarcinAman added a commit to MarcinAman/alpakka that referenced this issue Jun 12, 2019
MarcinAman pushed a commit to MarcinAman/alpakka that referenced this issue Jun 12, 2019
MarcinAman added a commit to MarcinAman/alpakka that referenced this issue Jun 12, 2019
2m added a commit that referenced this issue Jun 12, 2019
S3: Empty exception issue #1589
@2m 2m added this to the 1.0.3 milestone Jun 12, 2019
@2m
Copy link
Contributor

2m commented Jun 12, 2019

Fixed in #1748

@2m 2m closed this as completed Jun 12, 2019
cheleb pushed a commit to cheleb/alpakka that referenced this issue Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants