Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: expand FetchErrorDetails type #1389

Merged
merged 2 commits into from
Oct 14, 2024
Merged

fix: expand FetchErrorDetails type #1389

merged 2 commits into from
Oct 14, 2024

Conversation

KaiVandivier
Copy link
Contributor

@KaiVandivier KaiVandivier commented Oct 11, 2024

Noticed when using error details here: https://github.com/dhis2/reference-civil-registry-lookup/blob/069d664aa7d3c653c8a46c050c8e61d75eb327b4/civil-registry-plugin/src/LookupField/LookupField.tsx#L69-L72

This type should be flexible since details can vary, but provide some autocomplete for common properties

Here's an example error.details from a Route mutation:

{
    httpStatus: 'Not Found',
    httpStatusCode: 404,
    status: 'ERROR',
    message: 'Route does-not-exist not found',
    errorCode: 'E1005',
}

Some error details just end up as {}, as in some GET 404 responses

@amcgee amcgee merged commit ff0ad60 into master Oct 14, 2024
16 checks passed
@amcgee amcgee deleted the error-details-type branch October 14, 2024 09:45
dhis2-bot added a commit that referenced this pull request Oct 14, 2024
## [3.11.2](v3.11.1...v3.11.2) (2024-10-14)

### Bug Fixes

* expand FetchErrorDetails type ([#1389](#1389)) ([ff0ad60](ff0ad60))
@dhis2-bot
Copy link
Contributor

KaiVandivier added a commit that referenced this pull request Nov 25, 2024
KaiVandivier pushed a commit that referenced this pull request Nov 25, 2024
* expand FetchErrorDetails type ([#1389](#1389)) ([ff0ad60](ff0ad60))
dhis2-bot added a commit that referenced this pull request Nov 26, 2024
# [3.11.0-alpha.1](v3.10.4-alpha.1...v3.11.0-alpha.1) (2024-11-26)

### Bug Fixes

* **cacheable-section:** synchronously flush recording state for UI consistency ([04bc604](04bc604))
* add endpoint to text plain matchers ([#1390](#1390)) ([de8fbec](de8fbec))
* expand FetchErrorDetails type ([#1389](#1389)) ([78ad0b3](78ad0b3))
* handle alert returned async by parentAlertsAdd [LIBS-695] ([#1388](#1388)) ([bba9c23](bba9c23))
* **cacheable-section:** stable references to avoid loops [LIBS-642] ([#1385](#1385)) ([31562e9](31562e9))
* update plugin sizing definition ([#1383](#1383)) ([38c09b9](38c09b9))
* **deps:** remove cli-app-scripts peer dep [LIBS-587] ([#1379](#1379)) ([9e22e88](9e22e88))
* **deps:** update cli-app-scripts for package/types race condition ([dee6795](dee6795))

### Features

* fixed dimensions efficiency ([#1386](#1386)) ([b56ad2d](b56ad2d))
* upgrade app-runtime React version to v18 ([#1387](#1387)) ([0e4a3d5](0e4a3d5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants