GeneXusAI: Error handling and codes

Official Content

Every GeneXus AI task has a parameter based on Messages structured data type, which includes information about the status of the operation. This parameter is always the second last on the list, allowing you to write an AI task as follows.

&result = GeneXusAI.<Category>.<AI_Task>(&parm1, ..., &parmN, &messages)
where  
  &parm1,...,&parmN : Set of parameters whose types dependes on the AI task.
  &messages Messages, GeneXus.Common
  &result : Returned value whose type depends on the  AI task.

Codes

The table below lists the possible error codes raised by GeneXusAI, and is stored on the 'Id' field of the Messages.Message data type.

Code Description
GXAI1000   There is no result
Raised as an informational status when the provider does not give any output result.
GXAI1001 There is no processing
Raised as an informational status when the provider does not process any output.
GXAI1002 Language is not set
Raised as an informational status when a language is not set, but by setting it you could achieve higher accuracy.
GXAI4000 Credentials are missing
Raised when you do not provide your access credentials properly.
GXAI4001 Text is empty
Raised when the given input required text is empty.
GXAI4002 Language is empty
Raised when the given input required language is empty.
GXAI4003 Source language is empty
Raised when the given input required source language, in translation task context, is empty.
GXAI4004 Target language is empty
Raised when the given input required target language, in translation task context, is empty.
GXAI4005 Language has an incorrect format
Raised when the given input language is a two-letter code (e.g. 'en') but a language/locale is expected (e.g. 'en-US').
GXAI4006 File path is empty
Raised when the given input required file path is empty.
GXAI4007 File path does not exist
Raised when the given input file path does not exist.
GXAI4008 File format is not supported
Raised when the given file format is not supported.
GXAI4009 File fetch from URL failed
Raised when the given file URL cannot be fetched.
GXAI4010 File upload failed
Raised when the given file could not be uploaded to the application server.
GXAI4011 Model name '%1' is unknown
Raised when the given model name (%1) is unknown by the provider.
GXAI4012 File source is ambiguous, path and URL are both given
Raised when you give both URL and path for a file resource.
GXAI4013 File source is unspecified, path or URL must be given
Raised when you do not give any URL or path for a video resource.
GXAI4014 Collection '%1' is empty
Raised when the given collection input does not have elements.
GXAI4015 Recognition mode '%1' is unknown
Raised when the given recognition mode is unknown by the provider.
GXAI4016 SSML has a wrong format
Raised when the given SSML, in text-to-speech context, is unknown by the provider.
GXAI4017 Voice is unavailable
Raised when the given voice, in text-to-speech context, is not available by the provider.
GXA4018 File content or location is empty
Raised when the given file content or location (path/URL) is empty.
GXA4019 File is unavailable
Raised when your input file is not available or reachable.
GXA4020 URL has a wrong format.
Raised when you provide an URL with an unexpected format.
GXA4021 Credentials are ambigous, username/password and key are both given..
Raised when you provide both Username/Password and Key for authenticating, you must set only one mechanism.
GXAI4100 Parameter '%1' is missing
Raised when a required parameter is missing.
GXAI5000 External provider raise an error '%1'
Raised when the provider has not finished successfully, providing detailed information in JSON format (%1) about the error returned.
GXAI5001 Authentication failed due to an invalid token
Raised when the authentication has failed due to an invalid access token.
GXAI5002 Authentication failed during communication. Reason %1
Raised then the authentication has failed due to an unknown issue, giving detail about it in a JSON format (%1).
GXAI6000 Provider name is empty
Raised when you set a provider at runtime, but the Provider.Name field has not been set.
GXAI6001 Task '%1' is unavailable for '%2' provider
Raised when you try to execute an AI task which is not available for the given provider.

Scope

AI Task All
Platforms  Web(.NET,.NETCore,Java), SmartDevices(Android,iOS)

Availability

This document applies as of GeneXus 16.

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.