Sync_Error script not called for unauthorized device

Hi there,
in our project we would like to track the outcome of the sync state.
We noticed, that for an unauthorized device, the Sync_Error_XX scripts are not called.
Is this intended?
The failed authorization attempt is logged as a error neverless we are unable to hook onto this event.

These are the relevant entries in the logs:
time=“2023-03-20T19:37:30Z” level=info msg=“State transition: authorize-wait [Idle] → authorize [Sync]” …
time=“2023-03-20T19:37:30Z” level=debug msg="Making an authorization request () to server …
time=“2023-03-20T19:37:31Z” level=debug msg="Got response: &{401 Unauthorized 401 …
time=“2023-03-20T19:37:31Z” level=error msg=“Authorize failed: transient error: authorization request failed: transient error: authorization request failed: (request_id: ): authentication request rejected server error message: dev auth: unauthorized”
time=“2023-03-20T19:37:31Z” level=info msg=“State transition: authorize [Sync] → authorize-wait [Idle]”

Fyi, i tested with mender client:
3.1.0 runtime: go1.17.6

I can try to update to a newer version, if it helps