Unexpected result from Pantheon API when attempting to PURGE edge cache.

Created on 29 November 2017, over 7 years ago
Updated 27 February 2025, 4 months ago

Customer report:

Uncaught UnexpectedValueException: Unexpected result from Pantheon API when attempting to PURGE edge cache. in /srv/includes/pantheon.php:595 
Stack trace: 
#0 /srv/includes/pantheon.php(624): pantheon_clear_edge_keys_batch(Array) 
#1 [internal function]: pantheon_clear_edge_keys_shutdown() 
#2 {main} 
thrown 

/srv/includes/pantheon.php:59510

It looks like our Wordpress plugin had similar issues and the implemented fix was to catch the exception: https://github.com/pantheon-systems/pantheon-advanced-page-cache/issues/45

Perhaps we could implement a similar fix to this module. Providing at least a more helpful error report may allow the customer to understand the problem cause and support to better reproduce it.

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dustinleblanc Ithaca, NY

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡­πŸ‡ΊHungary aron novak Hungary, Budapest

    We could reproduce it while creating media entities via a bulk upload form, also during migrations.

  • πŸ‡­πŸ‡ΊHungary aron novak Hungary, Budapest

    Actually the try-catch is already there, it merely generates a watchdog entry.

  • Status changed to Closed: outdated about 2 months ago
  • πŸ‡ΊπŸ‡ΈUnited States capellic Austin, Texas

    I noticed a couple of these errors for the first time recently. Both happened on the /node/add page when adding a media image via the Media Library. That's as much as I can tell by the request I'm seeing in the Sentry log. (I am not the operator who triggered the error.) Hope it helps?

    https://****.pantheonsite.io/media-library?_wrapper_format=drupal_ajax&ajax_form=1&hash=Nbm-cFY3Tcr3AWclhJLnDlMNHvqurAyjepVDfV5DL0g&media_library_allowed_types%5Bimage%5D=image&media_library_opener_id=media_library.opener.field_widget&media_library_opener_parameters%5Bfield_widget_id%5D=field_common_image&media_library_opener_parameters%5Bentity_type_id%5D=node&media_library_opener_parameters%5Bbundle%5D=page&media_library_opener_parameters%5Bfield_name%5D=field_common_image&media_library_remaining=1&media_library_selected_type=image

  • πŸ‡ΊπŸ‡ΈUnited States rpayanm

    Same error as @capellic, and the image is not uploaded:
    Error in the web console:

    Uncaught 
    Object { message: "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 502\nDebugging information follows.\nPath: /media-library?media_library_opener_id=media_library.opener.field_widget&media_library_allowed_types%5Bimage%5D=image&media_library_selected_type=image&media_library_remaining=1&media_library_opener_parameters%5Bfield_widget_id%5D=field_hero_image&media_library_opener_parameters%5Bentity_type_id%5D=node&media_library_opener_parameters%5Bbundle%5D=sa_page&media_library_opener_parameters%5Bfield_name%5D=field_hero_image&hash=jrK_s5Wk_R-TSA8Z6nyGlWOTb6t1498NWPfvPCMHe_E&ajax_form=1\nStatusText: error\nResponseText: \r\n502 Bad Gateway\r\n502 Bad Gateway\r\nnginx\r\n", name: "AjaxError", stack: "@https://***.pantheonsite.io/core/misc/ajax.js?v=11.1.7:196:32\n@https://***.pantheonsite.io/core/misc/ajax.js?v=11.1.7:1926:3\n" }
    ​
    message: "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 502\nDebugging information follows.\nPath: /media-library?media_library_opener_id=media_library.opener.field_widget&media_library_allowed_types%5Bimage%5D=image&media_library_selected_type=image&media_library_remaining=1&media_library_opener_parameters%5Bfield_widget_id%5D=field_hero_image&media_library_opener_parameters%5Bentity_type_id%5D=node&media_library_opener_parameters%5Bbundle%5D=sa_page&media_library_opener_parameters%5Bfield_name%5D=field_hero_image&hash=jrK_s5Wk_R-TSA8Z6nyGlWOTb6t1498NWPfvPCMHe_E&ajax_form=1\nStatusText: error\nResponseText: \r\n502 Bad Gateway\r\n502 Bad Gateway\r\nnginx\r\n"
    ​
    name: "AjaxError"
    ​
    stack: "@https://***.pantheonsite.io/core/misc/ajax.js?v=11.1.7:196:32\n@https://***.pantheonsite.io/core/misc/ajax.js?v=11.1.7:1926:3\n"
    ​
    <prototype>: Error: 
    ajax.js:196:32
    
    

  • Just a quick note to say that our team is seeing the same errors as https://www.drupal.org/project/pantheon_advanced_page_cache/issues/29272... πŸ› Unexpected result from Pantheon API when attempting to PURGE edge cache. Active . We are on D10.4.

Production build 0.71.5 2024