Skip to content

Commit 5fcfa44

Browse files
committed
mark runtime exception as retryable.
1 parent ea005c7 commit 5fcfa44

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

inc/media_offload.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ public function generate_image_meta( $meta, $attachment_id ) {
14481448
do_action( 'optml_log', $exception );
14491449
}
14501450

1451-
self::mark_retryable_error( $attachment_id, 'Image ID: ' . $attachment_id . ' has an error from upload api:' . $exception->getMessage() );
1451+
self::mark_retryable_error( $attachment_id, 'Error from upload api:' . $exception->getMessage() );
14521452

14531453
return $meta;
14541454
} catch ( RuntimeException $exception ) {
@@ -1457,8 +1457,7 @@ public function generate_image_meta( $meta, $attachment_id ) {
14571457
do_action( 'optml_log', $exception );
14581458
}
14591459

1460-
update_post_meta( $attachment_id, self::META_KEYS['offload_error'], 'true' );
1461-
self::mark_retryable_error( $attachment_id, 'Image ID: ' . $attachment_id . ' has an unknown error from upload api:' . $exception->getMessage() );
1460+
self::mark_retryable_error( $attachment_id, 'Unknown error from upload api: ' . $exception->getMessage() );
14621461

14631462
return $meta;
14641463
}

0 commit comments

Comments
 (0)