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

fix: read property error of undefined when DOMException occured #623

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dreamdevil00
Copy link
Contributor

What type of issue are you creating?

  • Bug
  • Enhancement
  • Question

What version of this module are you using?

  • 2.0.10 (Stable)
  • 2.1.0-rc.n (2.1 Release Candidate n)
  • Other

Write other if any:

Please add a description for your issue:

I passed a wrong baseUrl to config accidently

const baseUrl = window.location.host;
LoopBackConfig.setBaseUrl(baseUrl);

when I call api, an DOMException error occured, and report the error as title.
The DOMException error message is

DOMException: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL

Related code:
LINK

we should make sure errorResponse.error exists, PTAL

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.

None yet

1 participant