Skip to content

Improve error message on connector init error#2105

Merged
bajtos merged 1 commit into
masterfrom
fix/err-msg-on-connector-error
Mar 2, 2016
Merged

Improve error message on connector init error#2105
bajtos merged 1 commit into
masterfrom
fix/err-msg-on-connector-error

Conversation

@bajtos

@bajtos bajtos commented Feb 26, 2016

Copy link
Copy Markdown
Member

Before this change, after adding a Cloudant-backed datasource to an app, node . will fail with

AssertionError: url is not valid
  (...stack trace...)

Now:

AssertionError: Cannot create data source "cds": Cannot initialize connector "cloudant": url is not valid
  (...stack trace...)

Requires loopbackio/loopback-datasource-juggler#859

/to @ritch please review

@bajtos
bajtos force-pushed the fix/err-msg-on-connector-error branch from e2a7f06 to 93d487f Compare February 26, 2016 13:46
@bajtos

bajtos commented Feb 26, 2016

Copy link
Copy Markdown
Member Author

@slnode test please

Comment thread lib/application.js
try {
var ds = dataSourcesFromConfig(name, config, this.connectors, this.registry);
this.dataSources[name] =
this.dataSources[classify(name)] =

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I regret adding this code... :(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I regret adding this code... :(

@ritch I think this particular line is safe to be removed in 3.0 - feel free to send a PR against loopback's master. Just add a short explanation to 3.0-RELEASE-NOTES.md as part of that patch.

@ritch

ritch commented Mar 1, 2016

Copy link
Copy Markdown
Member

LGTM

@ritch ritch assigned bajtos and unassigned ritch Mar 1, 2016
@bajtos

bajtos commented Mar 2, 2016

Copy link
Copy Markdown
Member Author

@slnode test please

1 similar comment
@bajtos

bajtos commented Mar 2, 2016

Copy link
Copy Markdown
Member Author

@slnode test please

bajtos added a commit that referenced this pull request Mar 2, 2016
Improve error message on connector init error
@bajtos
bajtos merged commit 913dd3a into master Mar 2, 2016
@bajtos bajtos removed the #review label Mar 2, 2016
@bajtos
bajtos deleted the fix/err-msg-on-connector-error branch March 2, 2016 12:18
bajtos added a commit that referenced this pull request Mar 2, 2016
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.

2 participants