When a HareScript JSON-RPC webservice function throws RPCInvalidArgsException, the caller gets an HTTP 500 instead of the 400 we expected. The original exception does not show up anywhere; the errors log only has:
mod::system/lib/internal/remoting/transports.whlib (129,12): Column 'DATA' does not exist. in JSONRPCTRANSPORT#ENCODEEXCEPTION
We see this on our production server and locally on a recent master, for every call that throws it. In our case that is our "not logged in / not enough permissions" check, so every rights rejection in one of our dashboards now reaches the browser as a 500.
What stands out: EncodeException sets error.data := DEFAULT RECORD for RPCInvalidArgsException, while without the etr debug tag the error record is created without a data cell. We have not tested it with etr enabled.
Happy to put together a minimal module that reproduces this, if that helps.
When a HareScript JSON-RPC webservice function throws
RPCInvalidArgsException, the caller gets an HTTP 500 instead of the 400 we expected. The original exception does not show up anywhere; the errors log only has:We see this on our production server and locally on a recent master, for every call that throws it. In our case that is our "not logged in / not enough permissions" check, so every rights rejection in one of our dashboards now reaches the browser as a 500.
What stands out:
EncodeExceptionsetserror.data := DEFAULT RECORDforRPCInvalidArgsException, while without theetrdebug tag theerrorrecord is created without adatacell. We have not tested it withetrenabled.Happy to put together a minimal module that reproduces this, if that helps.