Describe the bug
To save data as JSON to a state, a state_metadata key-value (state_metadata={"contentType": "application/json"}) pair has to be passed into the save_state dapr function.
When the state store is an Upstash Redis DB, the state saves fine, but returns this exception.
{
"detail": "failed saving state in state store payments-db: failed to set key payment-service||pi_3Q2BO6CYYUBUpUBM1WQijSxM: ERR Error running script: @user_script:15: the legacy path syntax is not supported. JSONPath must start with $ stack traceback: [G]: in function 'call' @user_script:15: in main chunk [G]: ?"
}
If you remove the state_metadata key/value pair, no exception is thrown and the state saves properly.
Describe the bug To save data as JSON to a state, a state_metadata key-value (
state_metadata={"contentType": "application/json"}
) pair has to be passed into thesave_state
dapr function.When the state store is an Upstash Redis DB, the state saves fine, but returns this exception.
If you remove the
state_metadata
key/value pair, no exception is thrown and the state saves properly.To Reproduce You'll have to clone this repo https://github.com/trey-rosius/payment_service and connect to an upstash redis DB(https://upstash.com/).
Expected behavior Expected no exception to be thrown when saving state
Screenshots
Additional context