In a situation where a scripted bootstrap is required to create a client private key, 'mender -bootstrap' returns an error when attempting to contact the Mender server after private key creation as the client has not yet been authorized. There is no easy way to tell if the key creation was actually successful or not without investigating the key file.
Additionally, when returning the error:
ERRO[XXXX] authorization request failed: (request_id: ): authentication request rejected server error message: dev auth: unauthorized module=main
Due to bootstrapping a new device, the "XXXX" number is inconsistent. There is no way to distinguish one error from another, as the same error returns different values. If this had some output indicating an error value, it would go a long way.