centralize errors on a single error function (#266)

prepareError receives an array of errors and return *model.Error object
with a message and error code, we can extend this function to add more
error types/code
This commit is contained in:
Lenin Alevski
2020-09-04 20:32:57 -07:00
committed by GitHub
parent 94096ee657
commit 0ba1e76400
24 changed files with 397 additions and 444 deletions

View File

@@ -35,7 +35,7 @@ import (
type Error struct {
// code
Code int64 `json:"code,omitempty"`
Code int32 `json:"code,omitempty"`
// message
// Required: true