diff --git a/attached_assets/Pasted--11-28-51-PM-express-serving-on-port-5000-11-29-02-PM-express-GET-api-cites-status-401-in-2ms--1742513423785.txt b/attached_assets/Pasted--11-28-51-PM-express-serving-on-port-5000-11-29-02-PM-express-GET-api-cites-status-401-in-2ms--1742513423785.txt new file mode 100644 index 0000000..b202ac6 --- /dev/null +++ b/attached_assets/Pasted--11-28-51-PM-express-serving-on-port-5000-11-29-02-PM-express-GET-api-cites-status-401-in-2ms--1742513423785.txt @@ -0,0 +1,26 @@ + +11:28:51 PM [express] serving on port 5000 +11:29:02 PM [express] GET /api/cites/status 401 in 2ms :: {"success":false,"connected":false,"message… +11:29:02 PM [express] GET /api/species 200 in 0ms :: {"success":true,"species":[]} +11:29:02 PM [express] GET /api/searches 200 in 1ms :: {"success":true,"searches":[]} +IUCN API check failed: getaddrinfo ENOTFOUND apiv4.iucnredlist.org +11:29:02 PM [express] GET /api/iucn/status 500 in 93ms :: {"success":false,"connected":false,"message… +11:29:03 PM [express] GET /api/cites/status 401 in 1ms :: {"success":false,"connected":false,"message… +11:29:03 PM [express] GET /api/species 304 in 1ms :: {"success":true,"species":[]} +11:29:03 PM [express] GET /api/searches 200 in 1ms :: {"success":true,"searches":[]} +IUCN API check failed: getaddrinfo ENOTFOUND apiv4.iucnredlist.org +11:29:03 PM [express] GET /api/iucn/status 500 in 28ms :: {"success":false,"connected":false,"message… +11:29:32 PM [express] POST /api/token 200 in 8787ms :: {"success":true,"token":{"id":1,"token":"vypRg… +11:29:32 PM [express] GET /api/token 200 in 1ms :: {"token":"vypRgcZfUGD4nCr8jt9Qkwtt","iucnToken":nu… +11:29:43 PM [express] GET /api/species/search 200 in 4033ms :: {"success":true,"data":{"pagination":{… +IUCN API habitats lookup failed: getaddrinfo ENOTFOUND apiv4.iucnredlist.org +11:29:43 PM [express] GET /api/iucn/habitats 500 in 13ms :: {"success":false,"message":"Error from IU… +IUCN API threats lookup failed: getaddrinfo ENOTFOUND apiv4.iucnredlist.org +11:29:43 PM [express] GET /api/iucn/threats 500 in 8ms :: {"success":false,"message":"Error from IUCN… +IUCN API species lookup failed: getaddrinfo ENOTFOUND apiv4.iucnredlist.org +11:29:43 PM [express] GET /api/iucn/species 500 in 6ms :: {"success":false,"message":"Error from IUCN… +11:29:43 PM [express] GET /api/species/8084 200 in 136ms :: {"success":true,"data":{"cites_listings":… +IUCN API conservation measures lookup failed: getaddrinfo ENOTFOUND apiv4.iucnredlist.org +11:29:43 PM [express] GET /api/iucn/measures 500 in 6ms :: {"success":false,"message":"Error from IUC… +11:29:43 PM [express] GET /api/species/8084 200 in 290ms :: {"success":true,"data":[{"id":19400,"iso_… +11:29:44 PM [express] GET /api/species/8084 200 in 309ms :: {"success":true,"data":[{"id":6292,"citat… diff --git a/server/routes.ts b/server/routes.ts index 504996c..cb2392d 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -323,7 +323,7 @@ export async function registerRoutes(app: Express): Promise { try { // Check if the API is working by hitting the version endpoint - const response = await axios.get("https://apiv4.iucnredlist.org/api/v4/information/api_version", { + const response = await axios.get("https://apiv3.iucnredlist.org/api/v3/version", { headers: { "Authorization": `Bearer ${iucnToken}` }