How to get more details of an api error

Daxcor

Member
Oct 31, 2021
25
1
8
57
I am trying to clone from a template via the api. I am getting a generic error back

Request failed with status code 500

Is there a way to get more details to help me debug my api calls?
 
  • Like
Reactions: aabraham
Hello Daxcor! Try to open the browser's developer tools (usually by pressing F12), open the Network tab , try to clone the template, click on the request that fails and look at the response headers and body. You should then be able to see more details.
 
I am trying to clone from a template via the api. I am getting a generic error back

Request failed with status code 500

Is there a way to get more details to help me debug my api calls?
Which template are you trying to fetch?
 
the PVE API will encode any error message in the HTTP status line. many HTTP/API clients don't print/display this by default though, or might make it inaccesible altogether. the API offers different formatters - if you switch to the "extjs" the API call will return status 200 but contain the actual status and error message in a JSON document in the response body.