Skip to content

Errors ​

Gommo Developer client

Official Gommo Developer TypeScript client — npm alias @ai-gateway/client. Calls Gommo public API (api.gommo.net, v2.api.gommo.net).

→ Gommo public API · Roadmap

Failed requests throw GatewayError:

typescript
import { GommoClient, GatewayError } from '@ai-gateway/client';

try {
  await client.jobs.create({ type: 'image', modelSlug: '', fields: {} });
} catch (err) {
  if (err instanceof GatewayError) {
    console.log(err.status);  // 400
    console.log(err.code);    // VALIDATION_ERROR
    console.log(err.message);
  }
}

Error codes ​

CodeTypical cause
UNAUTHORIZEDMissing or invalid Bearer token
VALIDATION_ERRORBad body / query
NOT_CONFIGUREDServer env missing (admin/merchant; PayOS only for legacy topup)
UPSTREAM_ERRORGommo upstream failure
INSUFFICIENT_CREDITSMerchant balance / topup reserve
INTERNAL_ERRORServer error

Gateway JSON shape: { success: false, message, code }.