diff --git a/CHANGELOG.md b/CHANGELOG.md index 0372bc24..4f3e9a2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), * [#558](https://github.com/shlinkio/shlink-web-client/pull/558) Added dark text for tags where the generated background is too light, improving its legibility. ### Changed -* *Nothing* +* [#567](https://github.com/shlinkio/shlink-web-client/pull/567) Improved Shlink 3.0.0 compatibility by checking the `INVALID_SHORT_URL_DELETION` error code when deleting short URLs. ### Deprecated * *Nothing* diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 4c656819..4dabd92b 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -114,6 +114,6 @@ export interface InvalidArgumentError extends ProblemDetailsError { } export interface InvalidShortUrlDeletion extends ProblemDetailsError { - type: 'INVALID_SHORTCODE_DELETION'; + type: 'INVALID_SHORTCODE_DELETION' | 'INVALID_SHORT_URL_DELETION'; threshold: number; } diff --git a/src/api/utils/index.ts b/src/api/utils/index.ts index 6de7681f..af2517e0 100644 --- a/src/api/utils/index.ts +++ b/src/api/utils/index.ts @@ -7,4 +7,4 @@ export const isInvalidArgumentError = (error?: ProblemDetailsError): error is In error?.type === 'INVALID_ARGUMENT'; export const isInvalidDeletionError = (error?: ProblemDetailsError): error is InvalidShortUrlDeletion => - error?.type === 'INVALID_SHORTCODE_DELETION'; + error?.type === 'INVALID_SHORTCODE_DELETION' || error?.type === 'INVALID_SHORT_URL_DELETION';