Rasa Action Server gRPC API
Input and Output
Following is the gRPC API definition for the Rasa Action Server.
The API is defined in the proto/action_webhook.proto
file in the Rasa SDK repository.
Error Handling
When Rasa server is communicating with the action server over gRPC protocol, and an error occurs, the action server should return appropriate error message containing proper gRPC status code and details.
Following are the possible error scenarios and the expected error response from the action server.
Rasa Python action server error handling support
Rasa Python action server provided by Rasa in the for of Rasa SDK is already handling these error scenarios and returning appropriate error messages to the Rasa server. If you are using a custom action server, you need to handle these error scenarios accordingly.
Custom action is not found
In case that the action server does not find the custom action, it should return:
- an error with gRPC status code
NOT_FOUND
- details in the error message in the format of:where{"action_name" : { "type": "string" },"message" : { "type": "string" },"resource_type" : "ACTION"}
action_name
is the name of the action that was not found,message
is a human-readable error message, andresource_type
is the type of the resource that was not found.
Custom action failed during execution
In case that the custom action fails during execution, it should return:
- an error with gRPC status code
INTERNAL
- details in the error message in the format of:where{"action_name" : { "type": "string" },"message" : { "type": "string" }}
action_name
is the name of the action that failed, andmessage
is a human-readable error message.
Domain is not found
In case that the action server does not find the domain,
which corresponds to the domain_digest
of the assistant, it should return:
- an error with gRPC status code
NOT_FOUND
- details in the error message in the format of:where{"action_name" : { "type": "string" },"message" : { "type": "string" },"resource_type" : "DOMAIN"}
action_name
is the name of the action which was targeted for invocation,message
is a human-readable error message, andresource_type
is the type of the resource that was not found.