nathaniel
500 Response when creating pod using API
looking it up, it seems some people's perspective is that since the error happened at the business logic layer rather than the http layer, I should return 200 but with some error struct in the response body. To that I say, nah. As a consumer I like being able to assume that 200 / 2xx actually means everything went fine and my error handling code doesn't need to parse any further unless response is not 2xx
16 replies
500 Response when creating pod using API
another option for us on the backend is to run the sql query with EXPLAIN and look at how many rows were left after each WHERE clause, and report back the ones that led to a sufficiently high % reduction of the search space. also pretty sophisticated but not as expensive since we're running the query anyway
16 replies
500 Response when creating pod using API
In future, we might spend some extra time to get potential machines with slightly altered versions of your input, and suggest to you "hey, your input works if you get rid of AllowedCudaVersions so maybe try that". For now that is a bit sophisticated
16 replies
500 Response when creating pod using API
unfortunately this is one of the places where we can't give you super great error messages on how to fix it. This means for the set of parameters you specified, no machines match all the constraints. There are too many possible causes of this for us to narrow one down to suggest.
Try removing all params you don't actually care about - they are all optional, we have defaults for them on the backend. Once you get to a configuration that works, add things in one by one to see if that was a reason machines were unavailable
16 replies
RRunPod
•Created by Cemal on 3/18/2025 in #⚡|serverless
Terminate worker
ok, the update I was talking about is now released, set includeWorkers=true for get and list endpoints to show current workers
13 replies
RRunPod
•Created by Cemal on 3/18/2025 in #⚡|serverless
Terminate worker
it sounds like you are polling through separate means for the error which will tell you the pod id, so yeah you can just use the rest api's delete pod endpoint
13 replies
RRunPod
•Created by Cemal on 3/18/2025 in #⚡|serverless
Terminate worker
will keep you updated on that first part, the second part can already be done if you know the worker's pod id by hitting DELETE https://rest.runpod.io/v1/pods/thePodId
13 replies
RRunPod
•Created by Cemal on 3/18/2025 in #⚡|serverless
Terminate worker
that's not the same as terminating a pod/worker by id. I am shortly adding an update to rest api which will let you pull the list of workers for your endpoint, and once you have the ids of those you can use the delete/terminate pod endpoint just as you can for normal pods
13 replies
RRunPod
•Created by ozzie on 3/18/2025 in #⚡|serverless
Delete Serverless Endpoint via the API?
the python sdk was created long before rest api existed, which is why it hits graphql all over the place
11 replies
RRunPod
•Created by ozzie on 3/18/2025 in #⚡|serverless
Delete Serverless Endpoint via the API?
as for why the code for gql was not working before, idk :shrug: but since rest api is just doing the same thing on the backend it was probably an error in calling it.
those opaque error messages from gql are unfortunate and someday we should figure out how to expose more info to users in them without revealing a bunch of internals. As devs, they are annoying to us too, but at least we can go look at the logs to see what actually went wrong
11 replies