Problem/Motivation

When a user submits a cache invalidation request using CloudfrontCacheInvalidateForm, and AWS API return a non-successful response code (e.g. 503), thus triggering an Exception, currently only a log message is added. The user should be notified when such error occurs.

Steps to reproduce

  • Go to /admin/config/services/cloudfront-invalidate-url
  • Submit an invalidation request by typing a URL and click Invalidate URL
  • (You can simulate an AWS error by supplying a wrong key/secret)
  • The success message "Cloudfront Cache invalidation is in progress. " displays instead of an error.

Proposed resolution

Display an error to the user when AWS API returns an error.

Remaining tasks

Write a patch to add a messenger->addError to display the error.

User interface changes

Display an error to the user when AWS API returns an error.

CommentFileSizeAuthor
#2 3307362-2--display-error-message.patch900 bytesandrew.wang

Comments

andrew.wang created an issue. See original summary.

andrew.wang’s picture

Status: Active » Needs review
StatusFileSize
new900 bytes
prashant mishra’s picture

Version: 3.0.1 » 3.0.2
Assigned: andrew.wang » prashant mishra
Status: Needs review » Closed (works as designed)
andrew.wang’s picture

Status: Closed (works as designed) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.