Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

fix(module-map): unhandled promise #23

Merged
merged 1 commit into from
Apr 6, 2021
Merged

Conversation

JAdshead
Copy link
Contributor

@JAdshead JAdshead commented Apr 2, 2021

Description

Errors thrown when parsing remote module maps are not handled, this leads to Error: Promise is rejected.
This is uninformative and would cause the dev cdn server to crash. By moving the error handling to a .catch outside of the .then it insures that any errors thrown inside the .then are also handled

Motivation and Context

Better DX.

How Has This Been Tested?

Unit tests and locally using a one app server to fetch an invalid module map.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (adding or updating documentation)
  • Dependency update

Checklist:

  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • My changes are in sync with the code style of this project.
  • There aren't any other open Pull Requests for the same issue/update.
  • These changes should be applied to a maintenance branch.
  • This change requires cross browser checks.
  • This change impacts caching for client browsers.
  • This change adds additional environment variable requirements for one-app-dev-cdn users.
  • I have added the Apache 2.0 license header to any new files created.

What is the Impact to Developers Using one-app-dev-cdn?

@JAdshead JAdshead requested review from a team as code owners April 2, 2021 16:32
@JAdshead JAdshead merged commit ded4b91 into main Apr 6, 2021
@JAdshead JAdshead deleted the feat/better-error-module-map branch April 6, 2021 20:10
oneamexbot added a commit that referenced this pull request Apr 6, 2021
## [3.3.1](v3.3.0...v3.3.1) (2021-04-06)

### Bug Fixes

* **module-map:** unhandled promise ([#23](#23)) ([ded4b91](ded4b91))
@oneamexbot
Copy link
Contributor

🎉 This PR is included in version 3.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants