The branch is badly named. The goal is to standardize error return types between botpress, nlu and language servers.
What this PR does:
[x] Type every known possible errors of the nlu in the nlu-client
[x] Create a language client with return types and errors of the language server
[x] Remove the possibility of having multiple language sources in the nlu-server's config (need an approval for this)
[x] Wrap a language server in a nlu server training error when a failure occurs. This way, the nlu-server user won't have to check stdout for logs to understand what happens.
[x] Do the same thing for Duckling
[x] Make sure error at predict time are also typed
Current Behavior:
If Language Server or duckling is not reachable when booting NLU Server, NLU Server fails LOUDLY with a clear error message.
NLU Server won't do any other health checks to Lang-Server or Duckling. It is up to the orchestrator (whatever this is), to do those checks.
NLU Server will explicitly state in its documentation that, once it is started with a lang-server, we can't change the config of the lang-server. If the user do, there will be weird unhandled behavior.
a) If an error occurs inside the NLU Server during the handling of a call (for an expected or unexpected reason) it returns a typed error datastructure.
b) If an error occurs inside the NLU Server during a training, it is persisted inside the database and return alongside with training status when queried.
c) If an error occurs inside the Lang Server (for an expected or unexpected reason) it also returns a typed error datastructure.
d) If an error datastructure is returned by lang-server, the nlu server wraps the inner error. It then returns it or stores it in with the training sessions info. Same goes for duckling.
NLU Server does no load balancing.
This will reduce the amount of issues raised on github even if these issues are not "real" issues. Currently when ever something like this is raised, we respond with "make sure your lang server is reachable".
The branch is badly named. The goal is to standardize error return types between botpress, nlu and language servers.
What this PR does:
Current Behavior:
This will reduce the amount of issues raised on github even if these issues are not "real" issues. Currently when ever something like this is raised, we respond with "make sure your lang server is reachable".