code change · fixIntegration & APIsofficial - Microsoftreviewed - checked by Opus

#8742 Enhance SharePoint error handling and add tests

SharePoint error handling now correctly parses OData verbose error responses to show meaningful error messages instead of empty strings. The parser falls back gracefully to OAuth token error format and raw body when needed.

Pull request · merged into main (BC30) on 2026-07-14 by glachana (community contribution) · 3 files (+79 -4), 1 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Fixes empty error messages from SharePoint REST API failures by parsing OData v3 verbose response format (error.message.value)
  • Maintains backward compatibility with OAuth token error shape (error_description) as a fallback
  • Supports OData v4 plain-string error format and malformed bodies
  • Added unit tests for all error response formats
  • No changes to public API or request construction
  • Behaviour changes for users or extensions.

AL objects touched

Context

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).