Hello, i have read the RPCResponse class docs as well as the "Error Handling" docs. You recommend error codes <-100 if one is to have own error codes.
We have an existing error code range today that is positive and basically 1-100 which we use in other systems (rest, batch systems, SMS etc). We would optimally like to have a global set of error codes, also for smartGWT, so that we can set DSResponse.status to our error code and handle that in the client code.
The main problem for us is that you always consider > 0 to be a success, which means that the dynamicforms will break when we send our custom, positive code back. In our specific test i think it breaks because it expects a Record in the DSResponse data field on successful operation.
It would be great if one somehow could specify that, for example everything !=1 is an error, or manually tell smartgwt that "this is an error", regardless of error code. Is this somehow possible?
We thought about manually converting back and forth between - and + so that smartgwt would consider our error codes failures, but that doesn't work either, since it then clashes with your rpcresponse error codes. I guess we could do -200 on the status code and then +200 clientside, but its really hacky... :)
As usual, your thoughts on what you think would be our best bet are much appreciated.
We have an existing error code range today that is positive and basically 1-100 which we use in other systems (rest, batch systems, SMS etc). We would optimally like to have a global set of error codes, also for smartGWT, so that we can set DSResponse.status to our error code and handle that in the client code.
The main problem for us is that you always consider > 0 to be a success, which means that the dynamicforms will break when we send our custom, positive code back. In our specific test i think it breaks because it expects a Record in the DSResponse data field on successful operation.
It would be great if one somehow could specify that, for example everything !=1 is an error, or manually tell smartgwt that "this is an error", regardless of error code. Is this somehow possible?
We thought about manually converting back and forth between - and + so that smartgwt would consider our error codes failures, but that doesn't work either, since it then clashes with your rpcresponse error codes. I guess we could do -200 on the status code and then +200 clientside, but its really hacky... :)
As usual, your thoughts on what you think would be our best bet are much appreciated.
Comment