[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [leshan-dev] Refusing client registration
|
Currently, when an exception(checked or runtime) is raised, we don't
reply with a BAD_REQUEST. It is just catched by californium which
"sysout" the stack trace and never answers to the request (this will
probably cause a timeout at client side).
Anyway, the changes proposed sound good for me !
I open 2 issue at OMA to modify the spec about that :
I think when an exeception is raised we should send a 500 internal
error :
https://github.com/OpenMobileAlliance/OMA-LwM2M-Public-Review/issues/36
When the registration is not accepted (registerClient returns
false), we should use the 4.03 response code which seems badly
described in the spec :
https://github.com/OpenMobileAlliance/OMA-LwM2M-Public-Review/issues/37
Le 26/02/2015 13:32, Julien Vermillard
a écrit :
Hi,
During the shim refactoring I removed some
unused checked exceptions.
One is problematic on ClientRegistry interface:
Client registerClient(
Client client)
throws ClientRegistrationException;
The ClientRegistrationException wasn't really
explicit
/** |
* An exception raised when
a client registry operation has failed. |
*/ |
So I decided to remove it because nowhere in
the leshan-standalone code we was throwing it.
But apparently ClientRegistrationException was used
to refuse the registration (e.g. I don't know this
client).
Anyway any exception (checked or runtime)
received by the registration code will just produce
a BAD_REQUEST return code, the only error code we
can return on the bootstrap operation...
I propose to change it to:
boolean
registerClient(
Client client);
returning true if the registration was accepted or not.
That's also mean we don't return anymore the previous
Client instance if a Client was already registered for this
endpoint. I hope this feature is not used :)
Julien
_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/leshan-dev