Troubleshoot Conversational Analytics API errors

If you encounter issues while using the Conversational Analytics API, refer to the following table for potential solutions.

Error Error cause HTTP status code gRPC status code Resolution
AlreadyExistsException ALREADY_EXISTS 409 Conflict 6 The resource already exists (for example, you are creating a duplicate entry). Use a different identifier or confirm that the resource doesn't already exist before creating it.
BadRequestException INVALID_ARGUMENT 400 Bad Request 3 The input is invalid or malformed. Validate the inputs or payloads before sending the request.
ForbiddenException PERMISSION_DENIED 403 Forbidden 7 You are authenticated but you are not allowed to access the resource. Check your user role and permissions. Contact an admin if needed.
FailedPreconditionException FAILED_PRECONDITION 400 Bad Request 9 The request violates the system state (for example, trying to delete a non-empty folder). Check the preconditions and fix the logic.
NotFoundException NOT_FOUND 404 Not Found 5

The resource is not found. Verify resource IDs or URLs. Ensure that the resource exists before trying to access it.

See Frequently asked questions about the Conversational Analytics API for more troubleshooting information.

ServiceUnavailableException UNAVAILABLE 503 Service Unavailable 14 There is a temporary server issue. Wait and retry with exponential backoff between attempts. If the error persists, file a bug report.
Connection reset by peer (during streaming) UNAVAILABLE 503 Service Unavailable 14

If you use a standard HTTP or REST client to call the streaming :chat endpoint, the server may have encountered a fatal error (such as a timeout or permission denial) during the stream. Because HTTP headers are already sent, the true error code is placed in HTTP/2 trailers, which standard REST clients cannot parse, resulting in a socket crash.

We recommend using the official Google Cloud gRPC client libraries, such as the Python SDK, to call streaming endpoints. These libraries parse these trailing headers and surface the true error cause.

Internal error encountered (during streaming) INTERNAL 500 Internal Server Error 13

If you use a standard HTTP or REST client to call the streaming :chat endpoint, the server may have encountered a fatal error during the stream. Because HTTP headers are already sent, the true error code is placed in HTTP/2 trailers, which standard REST clients cannot parse, resulting in a socket crash.

We recommend using the official Google Cloud gRPC client libraries, such as the Python SDK, to call streaming endpoints. These libraries parse these trailing headers and surface the true error cause.

UnauthenticatedException UNAUTHENTICATED 401 Unauthorized 16 Authentication is required, or authentication failed. Ensure that you are using the correct login credentials, API key, or token.
UnimplementedException UNIMPLEMENTED 501 Not Implemented 12 The requested feature is not available or not supported. Avoid calling this API, or wait for implementation.

Additional resources

For additional troubleshooting tips and answers to frequently asked questions, see the Frequently asked questions about the Conversational Analytics API page.

For guidance about asking effective questions of the Conversational Analytics API, see the Ask effective questions documentation page.