Gurren API

Erreurs

Codes d'erreur HTTP et formats de réponse.

Erreurs

Format standard

{
  "statusCode": 404,
  "message": "Automation not found or unauthorized",
  "error": "Not Found"
}

Format de validation

Quand les données envoyées sont invalides :

[
  {
    "property": "name",
    "constraints": {
      "isString": "name must be a string"
    },
    "receivedValue": 123
  }
]

Codes HTTP

CodeSignificationCauses courantes
400Bad RequestBody invalide, validation DTO échouée
401UnauthorizedClé API manquante, invalide, ou expirée
403ForbiddenScope insuffisant pour l'endpoint
404Not FoundRessource inexistante ou appartenant à un autre utilisateur
409ConflictAutomation déjà en cours d'exécution
500Internal Server ErrorErreur serveur inattendue

Exemples

Clé API manquante

curl https://api.gurren.leandre.io/api/v1/automations
{
  "statusCode": 401,
  "message": "API Key is missing",
  "error": "Unauthorized"
}

Clé API invalide

{
  "statusCode": 401,
  "message": "Invalid API Key",
  "error": "Unauthorized"
}

Scope insuffisant

{
  "statusCode": 403,
  "message": "Insufficient permissions. Required scopes: automation:execute",
  "error": "Forbidden"
}

Automation non trouvée

{
  "statusCode": 404,
  "message": "Automation not found or unauthorized",
  "error": "Not Found"
}

Les erreurs 404 sont aussi retournées si la ressource existe mais n'appartient pas à l'utilisateur authentifié. Cela évite l'énumération de ressources.

On this page