Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send data error handling #1187

Closed
JaroslawLegierski opened this issue Dec 22, 2021 · 6 comments
Closed

Send data error handling #1187

JaroslawLegierski opened this issue Dec 22, 2021 · 6 comments
Labels
enhancement Improvement of existing features server Impact LWM2M server
Milestone

Comments

@JaroslawLegierski
Copy link
Contributor

We noticed the problem in Leshan with the data received by the server using send data. For instance if the declared model is a Boolean and the data sent is “42”. Currently, it leads to a log error and a stack trace (lwm2m o.e.l.core.californium.LwM2mCoapResource : CodecException: Invalid content X for type X for path X).

We suggest that in this case the server should respond with 400 Bad request instead of 500 server error.

Please find below our proposal solving this problem:

[https://github.com/Przem83/leshan/tree/opl/send_data_error_handling] (Przem83@57e8d07)

@sbernard31 What is your opinion about this solution ?

@sbernard31 sbernard31 added enhancement Improvement of existing features server Impact LWM2M server labels Dec 22, 2021
@sbernard31
Copy link
Contributor

I think it makes totally sense. 👍

@sbernard31 sbernard31 added this to the 2.0.0 milestone Dec 22, 2021
@sbernard31
Copy link
Contributor

Do you plan to provide a PR ?

@JaroslawLegierski
Copy link
Contributor Author

Yes, I'll just clean the code and start the PR

@sbernard31
Copy link
Contributor

Great 🙂

@JaroslawLegierski
Copy link
Contributor Author

PR created: Send data error handling #1188

sbernard31 pushed a commit that referenced this issue Jan 11, 2022
Signed-off-by: Jarek <jaroslaw.legierski@orange.com>
Also-by: Simon Bernard <sbernard@sierrawireless.com>
@sbernard31
Copy link
Contributor

Implemented by #1195.

Thx again @JaroslawLegierski 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features server Impact LWM2M server
Projects
None yet
Development

No branches or pull requests

2 participants