Skip to content

Commit eafcfd4

Browse files
author
Pat Patterson
committed
Pass back cURL errors via 500 status code
1 parent 984c51b commit eafcfd4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

proxy.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@
271271

272272
$status = curl_getinfo( $ch );
273273

274+
if ( curl_errno( $ch ) ) {
275+
$status['http_code'] = 500;
276+
$contents = "cURL error ".curl_errno( $ch ).": ".curl_error( $ch )."\n";
277+
}
278+
274279
curl_close( $ch );
275280
}
276281

0 commit comments

Comments
 (0)