Urgent: Struggling with Country Codes Directory API Integration data refresh, getting 500 Internal Server Error!

Author
Ji-hoon Sato Author
|
1 week ago Asked
|
23 Views
|
2 Replies
0

Hey AdsVolt community,

I'm completely stuck and honestly, pretty desperate here. Our 'Country Codes Directory' web tool relies on regularly updated international calling codes and ISO data. We've set up an automation script to pull this data from a third-party API, but for the past several hours, every single attempt to run it results in a persistent 500 Internal Server Error.

This is blocking critical data refreshes for our data tool, and I've been banging my head against the wall trying to figure out what's going on. The error log itself is not as helpful as I'd hoped, making it difficult to pinpoint the exact issue. Here's what I'm seeing:

[2023-10-27 14:35:01] production.ERROR: GuzzleHttp\Exception\ServerException: Server error: `POST https://api.thirdparty.com/v1/update-codes` resulted in a `500 Internal Server Error` response:
<!DOCTYPE html>
<html>
    <head>
        <title>Server Error</title>
    </head>
    <body>
        <h1>Internal Server Error</h1>
        <p>Something went wrong on the server.</p>
    </body>
</html>
in /var/www/html/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /var/www/html/vendor/guzzlehttp/guzzle/src/Middleware.php:70 (GuzzleHttp\Exception\RequestException::create)
#1 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php:204 (GuzzleHttp\Middleware::GuzzleHttp\{closure})
#2 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php:177 (GuzzleHttp\Promise\Promise::callHandler)
#3 /var/www/html/vendor/guzzlehttp/promises/src/TaskQueue.php:47 (GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure})
#4 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php:246 (GuzzleHttp\Promise\TaskQueue::run)
#5 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php:223 (GuzzleHttp\Promise\Promise::wait)
#6 /var/www/html/vendor/guzzlehttp/guzzle/src/Client.php:131 (GuzzleHttp\Promise\Promise::wait)
#7 /var/www/html/app/Console/Commands/UpdateCountryCodes.php:78 (GuzzleHttp\Client::request)
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36 (App\Console\Commands\UpdateCountryCodes::handle)
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36 (call_user_func_array)
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93 (Illuminate\Container\BoundMethod::Illuminate\Container\{closure})
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37 (Illuminate\Container\BoundMethod::callBoundMethod)
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:111 (Illuminate\Container\BoundMethod::call)
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php:183 (Illuminate\Container\BoundMethod::call)
#14 /var/www/html/vendor/symfony/console/Command/Command.php:326 (Illuminate\Console\Command::execute)
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php:154 (Symfony\Component\Console\Command\Command::run)
#16 /var/www/html/vendor/symfony/console/Application.php:1071 (Illuminate\Console\Command::run)
#17 /var/www/html/vendor/symfony/console/Application.php:326 (Symfony\Component\Console\Application::doRunCommand)
#18 /var/www/html/vendor/symfony/console/Application.php:178 (Symfony\Component\Console\Application::doRun)
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:201 (Symfony\Component\Console\Application::run)
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:168 (Illuminate\Foundation\Console\Kernel::handle)
#21 /var/www/html/artisan:37 (Illuminate\Foundation\Console\Kernel::handle)
#22 {main}

So far, I've checked our API keys multiple times, verified the third-party API endpoint availability using curl (it responds fine), reviewed our server logs (which are surprisingly unhelpful for this specific 500, often just echoing the external 500 without more detail), and even tried a different API client library. Nothing seems to work.

I'm desperate for any insights or solutions from anyone who has tackled similar API integration issues causing server errors. This is completely blocking crucial data updates for our web tool, and I'm waiting for an expert reply!

2 Answers

0
MD Alamgir Hossain Nahid
Answered 1 week ago
This is completely blocking crucial data updates for our web tool, and I'm waiting for an expert reply!

I understand how frustrating these 500 errors are for web utilities and API integration; the 500 Internal Server Error from the third-party API indicates the problem lies on their server, likely failing to process your specific POST request payload, even if their endpoint is generally available.

Your primary action is to contact their API support with the exact request body and timestamp for them to investigate their server-side logs. Have you already opened a support ticket with them, including these details?

0
Ji-hoon Sato
Answered 1 week ago

Oh nice! Yeah, hitting up their support fixed it, was totally on their end with a bad payload. But now the script is crawling, processing the response data is taking forever even after it connects...

Your Answer

You must Log In to post an answer and earn reputation.