Improve error handling in operation callbacks
All the from{ByteArray,StringValue,JsonValue}() helper methods
return bool. However, the return value was never checked.
Add these checks and print warnings if something went wrong during
deserialization. Note that we still emit the {{nickname}}Finished()
signal with whatever values we have.
Additionally, provide some checks that QJsonDocument::fromJson()
actually succeded and created a document with an expected structure.
Note that the warning messages do not print the value. This is done
intentionally to avoid leaking some potentially sensitive values to
the logs.
Change-Id: I52c52e6af6a16f2b12649c67e7aca84b002c8aac
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
| commit | c0c3d0f52d24b1603dcc8b09502446572f57fbd6 |
| parent | c90fc5bb620c8005394b22e0e09d32aed71b668b |
| author | Ivan Solovev <ivan.solovev@qt.io> |
| committer | Ivan Solovev <ivan.solovev@qt.io> |
| commit time | Tue, 2 Sep 2025 16:46:01 +0200 |
- M src/main/resources/cpp-qt6-client/api-body.mustache
- M tests/auto/colorpalette/client/client/QtOAIColorsApi.cpp
- M tests/auto/colorpalette/qmlclient/client/OAIColorsApi.cpp
- M tests/auto/mediatype/client/client/QtOAITestApi.cpp
- M tests/auto/openapi2.0/client/client/QtOAIFakeApi.cpp
- M tests/auto/operation-parameters/client/client/QtOAITestApi.cpp
- M tests/auto/petstore/client/client/QtOAIPetApi.cpp
- M tests/auto/petstore/client/client/QtOAIStoreApi.cpp
- M tests/auto/petstore/client/client/QtOAIUserApi.cpp
- M tests/auto/petstore/qmlclient/client/OAIPetApi.cpp
- M tests/auto/petstore/qmlclient/client/OAIStoreApi.cpp
- M tests/auto/petstore/qmlclient/client/OAIUserApi.cpp