bcquality/microsoft/knowledge/error-handling
Michael Dieringer 67962727f6 Fix ten focused correctness items plus sample links from Jesper's 2026-09-15 re-review
Six carried-over threads:
- api-page-least-privilege-write-access fixtures: added the mandatory
  EntityName/EntitySetName properties (AL0485).
- pages-must-not-contain-business-logic fixtures: Sales Line has no
  "Total Amount" field; replaced with the real "Line Amount" (field 103).
- test-feature-scenario-tags.good.al and test-one-when-per-test.good.al:
  CreatePriceHeader leaves a price list in Draft status, which price
  calculation ignores. Added Validate(Status, Active) + Modify before the
  sales line that depends on it. Verified Status field/enum against
  PriceListHeader.Table.al and PriceStatus.Enum.al in the BCApps clone.
- exposed-objects-must-be-in-a-permission-set.md: a published codeunit is
  a SOAP endpoint (SOAP is deprecated), not OData - Page/Query are the
  OData object types. Corrected and pointed new integrations at API
  pages/queries instead.
- al-error-handling-review.md: the log-writes-must-survive-rollback cue
  selected on Session.StartSession, which only appears in the compliant
  fix, never in the anti-pattern - the bad fixture could never be
  worklisted. Recued on the actual risk shape (log insert around a
  failed TryFunction/GetLastError* path, then raise/propagate), with
  StartSession as an explicit compliant discriminator instead.
- page-design-must-match-bc-page-type-conventions.md: the enum value is
  NavigatePage, not Navigate; noted the type list is a selected subset,
  not an exhaustive PageType catalogue (PromptDialog, ConfigurationDialog,
  UserControlHost, XmlPort also exist, out of this article's scope).

Four new correctness gaps:
- release-must-update-app-version.md: "the version is the only identity"
  was backwards - id is the app's stable identity, version identifies a
  release/code-state of it.
- defensive-vs-offensive-code-must-match-blast-radius.good.al: the "low
  blast radius" example had no else branch, so a failed Customer.Get()
  left the field at its prior/default value instead of the explicit
  chosen fallback the article claims to demonstrate. Added the else.
- bcpt-scenarios-must-be-app-specific.good.al: InitTest and both measured
  StartScenario/EndScenario sections were empty/comment-only, so the
  "app-specific" fixture measured no actual work. Filled in a real,
  self-contained header+line creation path.
- upgrade-tag-logic-must-not-nest-deeply.good.al: the flattened version
  dropped both safety conditions the bad fixture had (Discount % = 0,
  nonblank posting group), silently changing behavior instead of just
  removing nesting. Extracted the guarded update into a helper with both
  conditions preserved as early exits.

Also converted this PR's remaining plain-backtick "See sample:" sample
references (16 articles) to the READ-convention markdown-link form,
matching the fix already made on #156/#158.

Rebased onto upstream/main (conflicts in al-ui-review.md, al-style-review.md,
al-upgrade-review.md against merged upstream PRs - all additive, both
sides' worklist cues retained).
2026-09-21 22:44:17 +02:00
..
collect-validation-errors-with-errorbehavior.bad.al Add error-handling knowledge domain and review leaf skill 2026-06-23 10:35:24 +02:00
collect-validation-errors-with-errorbehavior.good.al Fix lifecycle compatibility guidance (#93) 2026-07-14 11:26:16 +02:00
collect-validation-errors-with-errorbehavior.md Improve partner onboarding and documentation navigation (#174) 2026-09-09 17:31:03 +02:00
defensive-vs-offensive-code-must-match-blast-radius.bad.al Address second round of Jesper Schulz-Wedde's review on PR #157 2026-09-21 22:43:46 +02:00
defensive-vs-offensive-code-must-match-blast-radius.good.al Fix ten focused correctness items plus sample links from Jesper's 2026-09-15 re-review 2026-09-21 22:44:17 +02:00
defensive-vs-offensive-code-must-match-blast-radius.md Fix ten focused correctness items plus sample links from Jesper's 2026-09-15 re-review 2026-09-21 22:44:17 +02:00
errortype-internal-vs-client-for-diagnostics.bad.al Add error-handling knowledge domain and review leaf skill 2026-06-23 10:35:24 +02:00
errortype-internal-vs-client-for-diagnostics.good.al Add lifecycle error and privacy knowledge (#99) 2026-07-14 12:52:56 +02:00
errortype-internal-vs-client-for-diagnostics.md Improve partner onboarding and documentation navigation (#174) 2026-09-09 17:31:03 +02:00
fielderror-default-message-logic.bad.al Promote validated community knowledge (#105) 2026-07-14 14:20:27 +02:00
fielderror-default-message-logic.good.al Promote validated community knowledge (#105) 2026-07-14 14:20:27 +02:00
fielderror-default-message-logic.md Improve partner onboarding and documentation navigation (#174) 2026-09-09 17:31:03 +02:00
fielderror-vs-testfield.bad.al Promote validated community knowledge (#105) 2026-07-14 14:20:27 +02:00
fielderror-vs-testfield.good.al Promote validated community knowledge (#105) 2026-07-14 14:20:27 +02:00
fielderror-vs-testfield.md Improve partner onboarding and documentation navigation (#174) 2026-09-09 17:31:03 +02:00
ignored-tryfunction-return-disables-try-semantics.bad.al Add lifecycle error and privacy knowledge (#99) 2026-07-14 12:52:56 +02:00
ignored-tryfunction-return-disables-try-semantics.good.al Add lifecycle error and privacy knowledge (#99) 2026-07-14 12:52:56 +02:00
ignored-tryfunction-return-disables-try-semantics.md Improve partner onboarding and documentation navigation (#174) 2026-09-09 17:31:03 +02:00
log-writes-must-survive-rollback.bad.al Add 18 more community AL/BC patterns across appsource, data-modeling, error-handling, security, style, testing, ui, upgrade, and web-services 2026-09-21 22:42:49 +02:00
log-writes-must-survive-rollback.good.al Address second round of Jesper Schulz-Wedde's review on PR #157 2026-09-21 22:43:46 +02:00
log-writes-must-survive-rollback.md Fix ten focused correctness items plus sample links from Jesper's 2026-09-15 re-review 2026-09-21 22:44:17 +02:00
page-boolean-triggers-default-to-true.md Add precision guards for systematic agent false-positive patterns (#112) 2026-07-17 14:17:04 +02:00
prefer-errorinfo-for-actionable-errors.bad.al Add error-handling knowledge domain and review leaf skill 2026-06-23 10:35:24 +02:00
prefer-errorinfo-for-actionable-errors.good.al Add error-handling knowledge domain and review leaf skill 2026-06-23 10:35:24 +02:00
prefer-errorinfo-for-actionable-errors.md Improve partner onboarding and documentation navigation (#174) 2026-09-09 17:31:03 +02:00
unchecked-get-throws-when-record-not-found.md knowledge: add 3 FP-suppression guards from BC apps negative feedback 2026-07-21 09:45:09 +02:00