refatcor: improve error route interceptor
This commit is contained in:
@@ -15,17 +15,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package error_interceptor
|
||||
package errorinterceptor
|
||||
|
||||
type ErrorInterceptor struct {
|
||||
// ContentType error response content type, application/json, plain/text
|
||||
ContentType string `yaml:"contentType"`
|
||||
//ContentType string `yaml:"contentType"`
|
||||
//Errors contains error status code and custom message
|
||||
Errors []Error `yaml:"errors"`
|
||||
}
|
||||
type Error struct {
|
||||
// Code HTTP status code
|
||||
Code int `yaml:"code"`
|
||||
// Message custom message
|
||||
// Message Error custom response message
|
||||
Message string `yaml:"message"`
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package error_interceptor
|
||||
package errorinterceptor
|
||||
|
||||
const TextPlain = "text/plain"
|
||||
const ApplicationXml = "application/xml"
|
||||
Reference in New Issue
Block a user