canvas-lms/app/models/microsoft_sync
Evan Battaglia e64cc7d846 MSFT sync: make all graceful cancel errors public
* changes GracefulCancelErrorMixin mixin to class GracefulCancelError.
  All graceful cancel errors should be public, because they are expected
  errors so should have a public, internationalized, message.
* a few things that had GracefulCancelErrorMixin were not PublicErrors.
  Since they now are, I added public_message to them.
* Not strictly related but I made BatchRequestFailed and
  BatchRequestThrottled PublicErrors.

refs INTEROP-6739
flag=microsoft_group_enrollments_syncing

Test plan:
- Try changing your tenant to something we don't have access to,
  like microsoft.onmicrosoft.com
- Sync and look at the course integration settings. You should see the
  nice error saying 'Application not authorized for tenant. Please make
  sure your admin has granted access for us to access your Microsoft
  tenant.'
- Check the MicrosoftSync::Group object, there should be a last_error
  but not a last_error_report_id (Graceful Cancel Errors don't create
  error reports).

Change-Id: I583e24d1c9b0f50177c32010cf39c2d853c84a2a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269418
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-07-27 20:55:06 +00:00
..
group.rb MSFT Sync: Partial Sync 2021-06-18 17:07:51 +00:00
partial_sync_change.rb MSFT Sync: Partial Sync 2021-06-18 17:07:51 +00:00
user_mapping.rb MSFT sync: make all graceful cancel errors public 2021-07-27 20:55:06 +00:00