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

Account for fetch in promise #223

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Conversation

emilkowalski
Copy link
Owner

The fetch API does not reject a promise on HTTP error status such as 404 or 500. Instead, it resolves the promise with the ok property set to false. So we add an additional check for the .ok property.

Copy link

vercel bot commented Nov 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sonner ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 10, 2023 2:06am

@emilkowalski emilkowalski merged commit 8472d54 into main Nov 10, 2023
2 checks passed
SHABIN-K referenced this pull request in SHABIN-K/Brainwave Nov 21, 2023
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [sonner](https://sonner.emilkowal.ski/)
([source](https://togithub.com/emilkowalski/sonner)) | [`1.2.0` ->
`1.2.1`](https://renovatebot.com/diffs/npm/sonner/1.2.0/1.2.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/sonner/1.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/sonner/1.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/sonner/1.2.0/1.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/sonner/1.2.0/1.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>emilkowalski/sonner (sonner)</summary>

###
[`v1.2.1`](https://togithub.com/emilkowalski/sonner/releases/tag/v1.2.1)

[Compare
Source](https://togithub.com/emilkowalski/sonner/compare/v1.2.0...v1.2.1)

#### Styling

Styling customization, especially with Tailwind should be much easier
now. I created a new page in the documentation with more details -
https://sonner.emilkowal.ski/styling.

#### What's Changed

- Account for fetch in promise by
[@&#8203;emilkowalski](https://togithub.com/emilkowalski) in
[https://github.com/emilkowalski/sonner/pull/223](https://togithub.com/emilkowalski/sonner/pull/223)
- witll -> will by
[@&#8203;salieflewis](https://togithub.com/salieflewis) in
[https://github.com/emilkowalski/sonner/pull/230](https://togithub.com/emilkowalski/sonner/pull/230)
- Easier classname customization by
[@&#8203;emilkowalski](https://togithub.com/emilkowalski) in
[https://github.com/emilkowalski/sonner/pull/232](https://togithub.com/emilkowalski/sonner/pull/232)

#### New Contributors

- [@&#8203;salieflewis](https://togithub.com/salieflewis) made their
first contribution in
[https://github.com/emilkowalski/sonner/pull/230](https://togithub.com/emilkowalski/sonner/pull/230)

**Full Changelog**:
emilkowalski/sonner@v1.2.0...v1.2.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/SHABIN-K/toss).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
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.

1 participant