Skip to content

Commit

Permalink
Included a short error message and error description
Browse files Browse the repository at this point in the history
  • Loading branch information
Chad Petersen authored and Chad Petersen committed Jul 24, 2017
1 parent c8c41ee commit 0ad66d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions json_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
type JSONResolver struct{}

// ResolveJSONError returns a default json error response
func (resolver *JSONResolver) ResolveJSONError(w http.ResponseWriter, code int, message string) {
resolver.ResolveJSON(w, code, map[string]string{"error": message})
func (resolver *JSONResolver) ResolveJSONError(w http.ResponseWriter, code int, title, description string) {
resolver.ResolveJSON(w, code, map[string]string{"error": title, "error_description": description})
}

// ResolveJSON returns a json encoded response
Expand Down

0 comments on commit 0ad66d5

Please sign in to comment.