datashare icon indicating copy to clipboard operation
datashare copied to clipboard

feature: use JSON serializable object for task errors

Open bamthomas opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

For now, the TaskManager databus is using java Throwable when an error is happening in the TaskRunner. It is not compatible with other languages than JVM based language like python, node, ruby.

Describe the solution you'd like

We could use a TaskError object or the like, that would be serializable and adapted for each language to the stack trace model. The minimum properties are the following:

A StacktraceItem with attributes:

  • String file
  • int lineno
  • String name (méthode, classe...)

And a TaskError class (Error is used in java) with the following attributes :

  • String name
  • String message
  • Stringcause
  • List<StacktraceItem> stacktrace

For now we won't use a composite pattern (make a recursive implemnetation with a TaskError type for cause attribute) as it would make the implementation more complex. We don't necessarily need that much details, because for debugging purpose we have logs. If needed it may be added afterward.

See for the languages:

bamthomas avatar Jun 25 '24 13:06 bamthomas