if err!= nil { log.Printf("An error accured: %v", err) w.WriteHeader(500) return } status, headers := clientError.ResponseHeaders() // Get http status code and headers.
var schema loginSchema if err = json.Unmarshal(body, &schema); err!= nil { return NewHTTPError(err, 400, "Bad request : invalid JSON.")