payload icon indicating copy to clipboard operation
payload copied to clipboard

chore(plugin-cloud): refresh session on ExpiredToken error code

Open kendelljoseph opened this issue 1 year ago • 2 comments

Issue: https://github.com/payloadcms/payload/issues/8404

This code will refresh the session token upon receiving an ExpiredToken error when storageClient.getObject() receives that error.

  • The Error Code detected is determined by the error reported in the issue, and is an actual code from AWS documentation for Error Responses.

  • If the request fails again, the error is thrown.

kendelljoseph avatar Oct 28 '24 18:10 kendelljoseph

The code is looking good. I've just triggered a canary release 3.0.0-canary.ab70b75. Please run this on a deployed cloud project and verify base functionality is still working.

denolfe avatar Oct 29 '24 17:10 denolfe

Verified payloadPluginCloud() works with cognito credentials in a local env and in Payload Cloud.

kendelljoseph avatar Oct 30 '24 16:10 kendelljoseph

🚀 This is included in version v3.25.0

github-actions[bot] avatar Feb 27 '25 17:02 github-actions[bot]