Errors & Troubleshooting¶
GMC returns structured errors with an error key and message. SDKs map these to exceptions.
Error shapes¶
{
"key": "TEAM_NOT_FOUND",
"message": "No team for the provided credentials"
}
Java¶
- Base:
GmcException - Notable subclasses:
BadRequestException,UnauthorizedException,ForbiddenException,NotFoundException,ServerErrorException
try {
gmc.serverClient().startServer("srv-404").execute();
} catch (GmcException e) {
System.err.println(e.getMessage());
}
JavaScript¶
GmcApiException: HTTP error withstatusCode,errorKey,method,urlGmcClientException: network/unknown
try {
await gmc.serverClient.startServer('srv-404');
} catch (e) {
console.error(e);
}
Python¶
GmcApiException: HTTP error withstatus_code,error_keyGmcClientException: connection/unknown
try:
gmc.server_client.start_server('srv-404')
except Exception as e:
print(e)
Common issues¶
- 401 Unauthorized: Check headers and that key belongs to the correct team
- 403 Forbidden: Operation not permitted for your application user or team
- 404 Not Found: Resource id is wrong or not accessible within your team
- Multipart uploads: Ensure proper
Content-Typeand form field name