For the complete documentation index, see llms.txt. This page is also available as Markdown.

Analyse failed Node.js build

Returns an AI analysis of why a build failed and how to fix it, based on the build logs, the project file list and package.json.

Analyse failed Node.js build

get

Returns an AI analysis of why a build failed and how to fix it, based on the build logs, the project file list and package.json. Only builds in the failed state can be analysed; any other state returns 422. When no analysis could be produced both analysis and solution are null, in which case read Get NodeJS build logs instead.

Each call runs the analysis again, so call it once per failed build and keep the result. Limited to 5 calls per minute per API client (429 above that).

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
usernamestringRequiredExample: u123456789
domainstringRequired

Domain name

Example: mydomain.tld
uuidstring · uuidRequired

Build UUID

Example: 123e4567-e89b-12d3-a456-426614174000
Responses
200

Success response

application/json
analysisstring · nullableRequired

Why the build failed. null when no analysis could be produced.

Example: The build failed because the entry file server.js does not exist in the project root.
solutionstring · nullableRequired

Suggested fix for the build failure. null when no analysis could be produced.

Example: Set entry_file to the file that starts the server, for example index.js.
get/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/analysis
GET /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/analysis HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "analysis": "The build failed because the entry file server.js does not exist in the project root.",
  "solution": "Set entry_file to the file that starts the server, for example index.js."
}

Last updated

Was this helpful?