Hi i am working with golang on encoding/json and it return the json error with null:
{"user_message":"Can't find any Query with those parameters","application_context":"GroupsRepository.GetGroupsByQuery: ApplicationError: UserMessage - Error querying database for many Groups. ApplicationContext - Groups.GetMany: pq: column \"refill_too_soon_gpi_digits\" does not exist"} null
and the way that i marshall that it is:
func EncodeErrorResponse(w http.ResponseWriter, err error, status int) {
w.WriteHeader(http.StatusOK)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(err)
}
could someone help me please.