Skip to content

Improved Error Handling #689

@Shayan1375

Description

@Shayan1375

Background

As discussed on 09.10.2025, error handling needs to be improved regarding the return of Issue Objects on failed requests.


Description

1. CRTDL Validation Endpoint Missing

Currently, no validation endpoint exists for CRTDL. This issue is addressed here.

As discussed, a possible response format for the validation result is the JSON Patch format following RFC 6902.

Example Response

{
  "op": "add",
  "path": "/dataExtraction/attributeGroups/0/issue",
  "value": {
    "code": "PROFILE-50001",
    "message": "Ungültiges Profil-URL-Format"
  }
}

Here, the value field represents the Issue Object (see below).


2. Query Loading by ID via URL Parameters

Issue:

  • Unclear error handling mechanism for loading queries by ID.

Reference: Issue #416

Proposed Error Codes:

Code Meaning HTTP Status
QUERY-60001 Query ID not found 404
QUERY-60002 Query access denied 404
QUERY-60003 Query format incompatible 400

3. UI Profile Not Found

Current Behavior:

  • Returns null values for the values with 200 OK status
  • Endpoint: /terminology/criteria-profile-data

Required Change:

  • Returns an Issue object inside the uiProfile object
  • Proposed Error Code: TERMINOLOGY-50001

Example

  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "display": null,
    "context": null,
    "termCodes": null,
    "uiProfile": null,
    "issue": {
    	"code": "TERMINOLOGY-5001",
    	"message": "Ungültiger Term-Code"
    }
  }

4. Error Code Conventions

Format:

CATEGORY-NNNNN

Example: FEAS-10001

Categories:

Prefix Description
FEASIBILITY Feasibility-related errors
VALIDATION Validation errors
TERMINOLOGY Terminology service errors
SEARCH Search service errors
CONCEPT Concept-related errors
CRTDL CRTDL validation errors
PROFILE Profile-related errors
QUERY Query handling errors

5. Standard Error Response Structure

{
  "issue": {
    "code": "FEAS-10001",
    "message": "Ihr Account wurde wegen zu vieler Abfragen gesperrt"
  }
}

6. Further Notes

  • The proposed message values must be defined by the backend.
  • The frontend will handle translation of the provided error code.
  • All listed error codes are examples and must be further refined and aligned regarding their final identifiers and definitions.

Sub-issues

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions