AI Object
 
Syntax
 
AI.GetErrorCode(Handle As Long) As AIErrorCode
 
Description
Returns the error code of a conversation handle whose status is aiStatusError. Use this together with GetErrorMessage to find out why asynchronous processing failed.
 
For failures that happen at submission time — when Ask returns 0 — use the LastErrorCode property instead.
 
Parameter
Description
Handle
Long, a handle created with NewConversation.
 

Error codes

Constant
Value
Meaning
aiErrNone
0
No error.
aiErrNotConfigured
1
Configure was not called.
aiErrNetwork
2
Network or HTTP transport failure.
aiErrAuth
3
Authentication failed; the session is invalid.
aiErrRateLimit
4
Too many requests in a short time.
aiErrInvalidRequest
5
Malformed request, or an invalid follow-up.
aiErrModelError
6
The model returned a server-side error.
aiErrTimeout
7
The configured HTTP timeout was exceeded.
aiErrInvalidHandle
8
The handle is unknown.
aiErrInvalidResponse
9
The service response could not be parsed.
aiErrQuotaExceeded
10
The AI usage quota was exceeded.
aiErrJobFailed
11
Server-side processing of the job failed.
aiErrTooManyAttachments
12
More than 5 files attached.
aiErrAttachmentTooLarge
13
A single file exceeds 20 MB.
aiErrTotalSizeExceeded
14
The combined attachment size exceeds 30 MB.
aiErrUnsupportedMime
15
The file type is not supported.
aiErrFileNotFound
16
The file path does not exist.
aiErrFileReadFailed
17
The file could not be read.
aiErrNoRecordset
18
The recordset argument is missing.
aiErrRecordsetClosed
19
The recordset is closed or unusable.
aiErrUnknown
99
An unexpected error occurred.
 
See Also
GetErrorMessageGetStatusLastErrorCode.