Default Swagger configuration json does not have all possible response codes. When a response code is not mapped, a generic message such as "response code not found in API docs" is returned instead.
Swagger/Open API specification wavefront_swagger.json file is not coded with the response codes sent by the REST API.
While support will provide best-efforts to answer your questions, we do not support custom GO Swagger or custom API client.
Building a custom GO client requires development of the json file to handle all possible responses.
Example: POST /api/v2/usergroup (Create a specific user Group)
Test A) UI - API Documentation, POST ran by a User Account that does not have Permission to create the userGroup, results returned.
Error code 401
Code Details: 401 Error: response status is 401
Undocumented
Response body: You are trying to perform sensitive operation, password reprompt is needed.
Test B) Custom GO Client, POST API call by same user that does not have permissions AND the GO Swagger does not a mapping to handle this response.
"response code not found in API docs" the GO client default to the "not found" message.