-
Notifications
You must be signed in to change notification settings - Fork 56
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
Cumulocity operation failureReason field cannot contain quotes #2487
Comments
Double quotes in failure reason must be escaped by two double quotes like below.
This sanitize function escapes double quotes by two double quotes, so maybe our failure reason generation doesn't use this function? thin-edge.io/crates/core/c8y_api/src/smartrest/message.rs Lines 37 to 46 in b216239
|
@gligorisaev I'm hoping the examples from the robot test changes in https://github.com/thin-edge/thin-edge.io/pull/2493/files are sufficient for you to understand what this change affects in tedge and to reproduce it. |
QA has thoroughly checked the feature and here are the results:
|
Is your feature improvement request related to a problem? Please describe.
In #2474, I modified the code to debug print some values in errors that later get turned into failure reasons for operations. I was surprised to discover that the mapper removes quotes from failure reasons when serialising them to SmartREST, so this didn't work as intended.
Describe the solution you'd like
Quotes in the error message should be preserved when they are sent to Cumulocity.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: