Skip to content

Validate external Match API configuration and lookup configuration and access (fail fast with clear errors) #2393

@filiperochalopes

Description

@filiperochalopes

User story

As a user, I want the external Match API configuration to be validated (including lookup access) so misconfiguration fails fast with a clear error instead of writing to the wrong repository or crashing with a cryptic message.

Use case

Configure a custom Match API with optional lookup enabled and run mapping / post-coordination workflows.

Requirements

  • If lookup is enabled, validate lookup access before running:
    • Verify official repository permissions.
    • Ensure Filipe’s OCL API token (used to create post-coordinated concepts in the lookup repo) does not have write access to the official WHO-ICD-11 source.
  • Validate external Match API existence and authentication (e.g., token/credentials) before running.
  • If any validation step fails, return a clear, user-facing error message indicating which step failed (that includes 504/500 error from external match APIs).
  • Handle missing lookup configuration gracefully:
    • Do not default to writing into the authoritative WHO repo.
    • Fail gracefully with a clear message when lookup config is required/expected but missing.

Acceptance criteria

  • Given lookup is enabled, when lookup config or permissions are invalid, then the system stops before execution and shows a clear error message.
  • Given Match API authentication is invalid, when validating configuration, then a clear error is shown (no blank screen/crash).
  • Given lookup configuration is missing, then the system does not write to the authoritative WHO repo and instead fails gracefully with a clear message.

Sub-issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

No status

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions