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

Return detail information about a failure of an HTTP API call #331

Open
hyangtack opened this issue Dec 11, 2018 · 1 comment
Open

Return detail information about a failure of an HTTP API call #331

hyangtack opened this issue Dec 11, 2018 · 1 comment
Assignees

Comments

@hyangtack
Copy link
Contributor

When an exception is raised during processing an HTTP API request, a client might want to get the exception in order to get detail information why the request was failed. One option is returning stack trace to the client via HTTP response.

@hyangtack hyangtack self-assigned this Feb 21, 2019
@hyangtack
Copy link
Contributor Author

How about:

  • Adding verboseHttpResponses flag to CentralDogmaConfig (false by default)
  • Defining an error response class:
class ErrorResponse {
	String timestamp;
	String requestedPath;
	String message;
	List<Error> errors;
	List<StackInfo> trace;
}

class Error {
	String resource;	// project, repository, entry, revision, token
	String type;		// conflict, existence, nonexistence
	String target;		// the name of project/repository/entry, revision or token ID
}

..., but it would be better to handle this issue when implementing the HTTP API based client.

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