[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# TypeError: fetch failed "UNABLE_ TO_ VERIFY_ LEAF_ SIGNATURE" when fetching my external API

147 views · 2 likes · 3 posts


GenaDeev (@genadev) · 2024-07-21

Im trying to fetch some data from my external backend (node + express) in a NextJs 14.2.5 server component, but for some reason it fails in development and crashes when building to  production in Vercel. 

The API URL is 'https://filehost.comidolar.com.ar:6060/api/blackmaps/mapgallery'

I've red this is a SSL Certificate issue but I couldn't find any solution that fixes my problem.
This is not a NextJs related issue given that I've tried the same with other Server Side Frameworks and i got exactly the same error.


GenaDeev (@genadev) · 2024-07-21 · ♥ 1

Solved it! If you are facing this issue, in my case I solved it by adding the "ca-bundle.crt" file to my express API. I only had the certificate and the private key imported in the app and that was causing the error.


Pauline P. Narvas (@pawlean) · 2024-07-21 · ♥ 1

Thanks for coming back to share your solution, @genadev!