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

Show useful information when failing on redirect #3169

Open
jroper opened this issue Apr 24, 2024 · 0 comments
Open

Show useful information when failing on redirect #3169

jroper opened this issue Apr 24, 2024 · 0 comments
Labels

Comments

@jroper
Copy link

jroper commented Apr 24, 2024

#312 introduced code that failed when a redirect response code was returned. However, there is nothing useful in the exception name or message that even states that this is a redirect, let alone how to resolve the issue. For example, if you log the error out to logback or something like that, this is what gets printed:

akka.stream.alpakka.s3.S3Exception: 
	at akka.stream.alpakka.s3.S3Exception$.apply(S3Exception.scala:41)
	at akka.stream.alpakka.s3.impl.S3Stream$.$anonfun$unmarshalError$1(S3Stream.scala:614)
	at scala.util.Success.map(Try.scala:262)
...

Completely useless. Outputting S3Exception.toString is only marginally better:

akka.stream.alpakka.s3.S3Exception:  (Status code: 301 Moved Permanently, Code: 301 Moved Permanently, RequestId: -, Resource: -)

The exception message should state that a redirect response code was returned, and the value of the Location header should be included in the message, so that we can have some idea of what we're being redirected to, which should help to explain how to address the issue.

@ennru ennru added the p:aws-s3 label Aug 12, 2024
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

2 participants