Skip to content

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

Open
dreamdevil00 wants to merge 1 commit intomean-expert-official:masterfrom
dreamdevil00:master
Open

fix: read property error of undefined when DOMException occured#623
dreamdevil00 wants to merge 1 commit intomean-expert-official:masterfrom
dreamdevil00:master

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.

1 participant