AdobeDocs / photoshop-api-docs-pre-release

Adobe Photoshop Pre-release API
https://adobedocs.github.io/photoshop-api-docs-pre-release/
MIT License
40 stars 13 forks source link

Allow S3 region to be set in config.json #15

Closed pdkn closed 4 years ago

pdkn commented 4 years ago

Expected Behaviour

Make it easy to configure S3 region (for /jwt-sample-app example)

Actual Behaviour

S3 region is defaulted to us-east-1 with no obvious way to set, if S3 bucket is in a different region the error returned "unable to download input href" is not obvious as to what is wrong.

Reproduce Scenario (including but not limited to)

S3 buckets not in region us-east-1

Steps to Reproduce

Create a S3 bucket in region eu-west-1 Follow instructions Then run - Error at writeStatus(` rendition: ${renditionResult.outputs[0]._links.renditions[0].href}`)

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

pdkn commented 4 years ago

Pull request here - https://github.com/AdobeDocs/photoshop-api-docs-pre-release/pull/16

pdkn commented 4 years ago

The actual error message from AWS (if you paste the presigned input href into browser)

<Error>
<script/>
<Code>AuthorizationQueryParametersError</Code>
<Message>
Error parsing the X-Amz-Credential parameter; the region 'us-east-1' is wrong; expecting 'eu-west-1'
</Message>
<Region>eu-west-1</Region>
<RequestId>XXXX</RequestId>
<HostId>XXXX</HostId>
</Error>

which would be great to surface somehow in the error.details results of an api call to help with debugging

noahhoffman commented 4 years ago

@pdkn Thanks for contributing! I'll pull this in today to both the pre-release and release sites. I actually already have an open bug on my plate for this week or next to surface storage errors to the client like you've suggested