eclipse-uprotocol / up-spec

uProtocol Specifications
Apache License 2.0
33 stars 25 forks source link

unregister_listener(), etc, error codes? #136

Closed matthewd0123 closed 5 months ago

matthewd0123 commented 5 months ago

Hi all,

Wanted to ask if error codes possible are specified for transports. Ran into something testing out up-client-zenoh implementations with TCK vs socket. On zenoh, if call unregister_listener() on topic that hasn't been registered, you get a INVALID_ARGUMENT. However, in the socket transport implementations, we've set it to NOT_FOUND. Just would want a file in spec that outlines different error codes for transport. Would be willing to take this up if worthwhile.

evshary commented 5 months ago

I believe this is worthwhile to have the same definition of the error code. Defining in spec is a good idea. I chose the error code based on my intuition before and it might not be the proper one.

sophokles73 commented 5 months ago

I have addresed this in my recent PR ...

Are there other error codes that we need to define?

stevenhartley commented 5 months ago

@matthewd0123 please check #134 and if it addresses this concern we can close this issue. Thank you.

matthewd0123 commented 5 months ago

@sophokles73 @stevenhartley perfect, I'll take a look and close this out. Thanks!!

matthewd0123 commented 5 months ago

found the point in the PR where the issue we saw is defined. Will close this out and open a new issue with the client implementations that differ.