Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Wrapper Error Handling #21

Closed
justinmerrell opened this issue May 3, 2023 · 1 comment · Fixed by #96
Closed

API Wrapper Error Handling #21

justinmerrell opened this issue May 3, 2023 · 1 comment · Fixed by #96
Assignees
Labels
enhancement New feature or request

Comments

@justinmerrell
Copy link
Member

When no GPU is available the following is returned:

Curl returns the error "{"errors":[{"message":"There are no longer any instances available with the requested specifications. Please refresh and try again.","path":["podFindAndDeployOnDemand"],"extensions":{"code":"RUNPOD"}}],"data":{"podFindAndDeployOnDemand":null}}"

This needs to be handled by the language API and returned.

@shibanovp
Copy link
Contributor

Currently, you must print raw_response

raw_response = run_graphql_query(

to visualize the error. It would be preferable to either raise an exception or implement another method of notifying the user.

@justinmerrell justinmerrell self-assigned this Aug 16, 2023
@justinmerrell justinmerrell added the enhancement New feature or request label Aug 16, 2023
@justinmerrell justinmerrell linked a pull request Aug 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants