Giter Club home page Giter Club logo

Comments (4)

aggarg avatar aggarg commented on July 18, 2024

Yes, as of now you need to put a client token in the shadow update document. As you correctly pointed out, it is optional in the AWS Shadow Service and we will see how we can make this optional in Amazon FreeRTOS.

Thank you for bringing it to our attention.

from amazon-freertos.

xiongyu0523 avatar xiongyu0523 commented on July 18, 2024

I understand the reason why Amazon FreeRTOS always expect ClientToken, this makes sure Shadow API get matching expectation/response from the cloud. The subscribed topic /update/accepted can receive a message whenever other updates take place.

I just found another issue, when an invalid json is updated and shadow service can't parse it, the response error document will not contain "clientToken", so the thing will not get rejected notification.
While if only some of field in JSON is not correct, (e.g. "state" -> "sta1e"), the response error document can include matching "clientToken" and Shadow API returns 400 soon.

Case 1:
image

Case 2:
image

from amazon-freertos.

aggarg avatar aggarg commented on July 18, 2024

This is by design as of now that we do not invoke any callback if the response document does not contain a valid clientToken. We will look into how can we inform the user about the receipt of a JSON document without a valid token.

Thank you for pointing it out.

from amazon-freertos.

yuhui-zheng avatar yuhui-zheng commented on July 18, 2024

Appreciate bringing this up, please don't hesitate to reach out again if any other concern. Closing this issue since it has been inactive.

from amazon-freertos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.