Skip to content

Improve error messages#880

Merged
Blodir merged 4 commits intodevelopmentfrom
improve-error-messages-251106
Jan 14, 2026
Merged

Improve error messages#880
Blodir merged 4 commits intodevelopmentfrom
improve-error-messages-251106

Conversation

@olzraiti
Copy link
Contributor

Error toast displays errorCode and message from API errors, if there's an errorCode. Otherwise it falls back to "hups" message.

@olzraiti olzraiti changed the title Improve error messages 251106 Improve error messages Dec 16, 2025
@rpulkka rpulkka self-assigned this Jan 12, 2026
@rpulkka rpulkka self-requested a review January 12, 2026 06:09
Copy link
Contributor

@rpulkka rpulkka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Number of as any could be reduced by expanding the typing of handleError() params:

handleError(error: { message: string | string[]; toString: () => any; error?: { errorCode: string; message: string } }) {
  ...
  const { title, message } = error?.error?.errorCode
}

Or then just use error?: any in the params

@olzraiti
Copy link
Contributor Author

I made error to be any. Looks to be more accurate looking at the implementation (at the start it looks like it can be object, string etc).

@rpulkka rpulkka self-requested a review January 13, 2026 12:55
Copy link
Contributor

@rpulkka rpulkka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK!

@rpulkka rpulkka added this to the Release 88 milestone Jan 13, 2026
@Blodir Blodir merged commit 56ae19f into development Jan 14, 2026
1 check passed
@Blodir Blodir deleted the improve-error-messages-251106 branch January 14, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants