Skip to content

Commit 6517c4b

Browse files
authored
Update error_default.go
1 parent 3179543 commit 6517c4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

error_default.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,10 @@ func (e DefaultError) Format(s fmt.State, verb rune) {
323323
}
324324
}
325325

326-
func ToDefaultError(err error, requestID string) *DefaultError {
326+
func ToDefaultError(err error, code int, requestID string) *DefaultError {
327327
de := &DefaultError{
328328
RIDField: requestID,
329-
CodeField: http.StatusInternalServerError,
329+
CodeField: code,
330330
DetailsField: map[string]interface{}{},
331331
ErrorField: err.Error(),
332332
}

0 commit comments

Comments
 (0)