Related to: https://github.com/fleetdm/fleet/issues/40127
Changes:
- Updated errors logged by Android proxy endpoints to include more
information about the error.
- Added a `deviceNoLongerManaged` exit to the `delete-android-device`
endpoint that is used when the Google API returns a "Device is no longer
being managed" error.
- Added a `policyNotFound` exit to the `modify-android-policies` and
`modify-enterprise-app-policy` endpoints that is used when the Google
API returns a 404 response
- Added a `invalidPolicyName` exit to the `modify-android-device`
endpoint that is used when the Google API returns an error related to
the policy name sent in the request body.
Closes: https://github.com/fleetdm/fleet/issues/34358
Changes:
- Updated Android enterprise proxy endpoints to log an additional
warning to alert us if we exceed the Android management API rate limit.
Haven't fully QA'd as I am not sure how to repro locally(when I test the
pubsub arrives before we ever run the reconciler) however this should
cause 4xx to be returned from the website instead of 5xx for android
unenrolled. We use the exact same code on a different endpoint
<!-- Add the related story/sub-task/bug number, like Resolves#123, or
remove if NA -->
**Related issue:** Resolves#34988 partially. This just helps reduce
alerts to help-p1 and implements the interface that the server is
expecting