Version/Environment (if relevant):
This applies to all versions of Domino.
Issue:
The Model API works on the Tester tab. However, it doesn’t work when you hit the Model API with a POST request. It does not accept the POST request from the endpoint.
The Instance logs show errors indicating that there is a missing argument (model_time_ms
) to the function build_response_error()
:
ERROR in app: Exception on /model [POST]
else (harness_lib.build_error_response('"data" or "parameters" must be supplied'), 400)
TypeError: build_error_response() missing 1 required positional argument: 'model_time_ms'
Root Cause:
The error indicates that the request body is not in the correct format.
Resolution:
Change the format to the JSON document in the form either:
{
"data": {
...
}
}
or
{
"parameters": [
...
]
}
Notes/Information:
For more about Model API's:
- Host Models as REST APIs
- Model APIs section of Domino University's Publishing in Domino
Comments
0 comments
Please sign in to leave a comment.