Having different return codes for different types of errors could help users and developers indicate what error they are dealing with. This could be also useful for xOpera API and xOpera SaaS API to return better responses for the end users.
As things are now, we always return the code 1 regardless of error type. Opera has three main exception types (located in src/opera/error.py):
ParseError,
DataError and
OperationError.
I propose return codes 1, 2 and 3 for these and 4 for other exceptions.
Steps
To realize this we should update the return codes in all python files to be consistent.
Current behaviour
Right now opera uses only one return code for errors (1).
Expected results
To have different return codes for different types of errors (1, 2, 3, 4).
Description
Having different return codes for different types of errors could help users and developers indicate what error they are dealing with. This could be also useful for xOpera API and xOpera SaaS API to return better responses for the end users.
As things are now, we always return the code 1 regardless of error type. Opera has three main exception types (located in
src/opera/error.py
):ParseError
,DataError
andOperationError
.I propose return codes 1, 2 and 3 for these and 4 for other exceptions.
Steps
To realize this we should update the return codes in all python files to be consistent.
Current behaviour
Right now opera uses only one return code for errors (1).
Expected results
To have different return codes for different types of errors (1, 2, 3, 4).