Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Feat: admin error handling #117

Merged
merged 8 commits into from
Oct 20, 2021
Merged

Feat: admin error handling #117

merged 8 commits into from
Oct 20, 2021

Conversation

sebastiannicolajsen
Copy link
Contributor

What

  • Display the error messages given by the API in toasters across the admin project.

Why

  • The current error messages were providing less feedback than these, and utilising the errors given by the API provides greater flexibility in feedback.

How

  • Add a utility function to extract error messages and use this across the project to fetch error messages for toasters. Doing so, allows us to unify (most) error messages / display strings.

@@ -68,10 +69,8 @@ const GiftCardDetail = ({ id }) => {
const { regions } = useMedusa("regions")

const formatNumber = n => {
Copy link
Contributor

Choose a reason for hiding this comment

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

does this not exist in utils/prices

Copy link
Contributor Author

@sebastiannicolajsen sebastiannicolajsen Oct 13, 2021

Choose a reason for hiding this comment

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

Created #141

Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

LGTM

@olivermrbl olivermrbl merged commit f382e6d into develop Oct 20, 2021
@olivermrbl olivermrbl deleted the feat/admin-error-handling branch October 20, 2021 08:30
fPolic pushed a commit that referenced this pull request Mar 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants