Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adds console logging for validation errors #47

Merged
merged 1 commit into from
Aug 7, 2016
Merged

Adds console logging for validation errors #47

merged 1 commit into from
Aug 7, 2016

Conversation

maugenst
Copy link
Contributor

Hi Scott.

I recently stumbled on some swagger issues in my yaml file which was just shown as "Error in callback! Tossing to global error handler. Error: Swagger validation errors:"

So I implemented a better logging to console.error pointing the user directly to where the errors occured.
Adds console logging to console.error that points the user directly to erroneous configuration in their swagger config.

I hope this is feasible...

Thanks, Marius

This fix adds console logging to console.error that points the user
directly to erroneous configuration in their swagger config.
@coveralls
Copy link

coveralls commented Jul 13, 2016

Coverage Status

Coverage decreased (-0.7%) to 96.303% when pulling ce3d1a1 on maugenst:master into 2c1321b on theganyo:master.

@maugenst
Copy link
Contributor Author

Any news on this? Any objections?

@maugenst
Copy link
Contributor Author

Console log would be way more informative.

From:
`Error in callback! Tossing to global error handler. Error: Swagger validation errors:
at C:\github\dart.online.spielbericht\node_modules\swagger-node-runner\index.js:210:23
C:\github\dart.online.spielbericht\node_modules\swagger-node-runner\index.js:242
process.nextTick(function() { throw err; });
^

Error: Swagger validation errors:
at C:\github\dart.online.spielbericht\node_modules\swagger-node-runner\index.js:210:23
`

It would display:
`Error in callback! Tossing to global error handler. Error: Swagger validation errors:
at C:\github\dart.online.spielbericht\node_modules\swagger-node-runner\index.js:210:23
Details:
#0.: Path parameter is declared but is not defined: username in swagger config at: >paths//changePassword/user/{username}/post<
#1.: Path parameter is declared but is not defined: username in swagger config at: >paths//changePassword/user/{username}/delete<
C:\github\dart.online.spielbericht\node_modules\swagger-node-runner\index.js:247
process.nextTick(function() { throw err; });
^

Error: Swagger validation errors:
at C:\github\dart.online.spielbericht\node_modules\swagger-node-runner\index.js:210:23
`

@theganyo theganyo merged commit 20f123d into apigee-127:master Aug 7, 2016
@theganyo
Copy link
Collaborator

theganyo commented Aug 7, 2016

Sorry for the delay. Sounds good. Thanks for the contribution!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants