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

Log full REST API Conflunce response in case of REST API invocation error #179

Closed
qwazer opened this issue Oct 26, 2018 · 2 comments
Closed
Assignees
Milestone

Comments

@qwazer
Copy link
Contributor

qwazer commented Oct 26, 2018

version 6.0-rc3

Currently, plugin doesn't print REST API invocation error from Confluence.
It increases troubleshooting efforts.

Example of log

Caused by: org.bsc.confluence.rest.AbstractRESTConfluenceService$ServiceException: error: update page
Response{protocol=http/1.1, code=500, message=, url=http://localhost:8090/rest/api/content/65624}

Desired output shold include

{"statusCode":500,"data":{"authorized":false,"valid":true,"allowedInReadOnlyMode":true,"errors":[],"successful":false},"message":"com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'url' is unknown.","reason":"Internal Server Error"}

The responce above can be taken in method org.bsc.confluence.rest.AbstractRESTConfluenceService#fromRequest
with next instruction

res.body().string()

Include it in ServiceException or log as maven warning

@qwazer qwazer changed the title Log full conflunce responce in case of REST API invocation error Log full REST API Conflunce response in case of REST API invocation error Oct 26, 2018
@bsorrentino bsorrentino self-assigned this Oct 28, 2018
@bsorrentino bsorrentino added this to the 6.0 milestone Oct 28, 2018
@bsorrentino
Copy link
Owner

bsorrentino commented Oct 29, 2018

@qwazer I've deployed 6.0-SNAPSHOT with fix.

Please, try it out and let me know

bsorrentino added a commit that referenced this issue Oct 29, 2018
@qwazer
Copy link
Contributor Author

qwazer commented Oct 30, 2018

@bsorrentino Thanks, it works!

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

No branches or pull requests

2 participants