PokeAPI/api-data

Occasionally a resource list request returns a 400 response

sargunv opened this issue · 3 comments

A retry always works.

The error is from this code:

let path = "/api/v2/" + event.queryStringParameters.endpoint + "/";
if (!path) {
callback(null, {statusCode: 400, body: "path must not be empty"});
return;
}

Looks like sometimes the endpoint name isn't being passed to the function. May be another Netlify bug.

Is this related?
https://pokeapi.netlify.com/api/v2/pokemon/
Doesn't work on a retry, though.

Is this related?

There was a temporary similar issue caused by the broken builds + name change which caused all resource list requests to fail until a build with the new name succeeded. That failure had the same error message but isn't actually related.

Now that we've had a successful build, it's back to the issue in the OP.

I should've been more specific with my 'is this related' message - I was getting an error saying the resource list could not be found; now it's a standard 500.