Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Dec 4, 2024
1 parent cf81427 commit f995588
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions agglayer/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,23 +634,23 @@ func (c *CertificateHeader) UnmarshalJSON(data []byte) error {
return err
}

var ppError error
var agglayerErr error

for errKey, errValueRaw := range inErrDataMap {
errValueJSON, err := json.Marshal(errValueRaw)
if err != nil {
ppError = &GenericError{
agglayerErr = &GenericError{
Key: errKey,
Value: fmt.Sprintf("failed to marshal the agglayer error to the JSON. Raw value: %+v\nReason: %+v",
errValueRaw, err),
}
} else {
ppError = &GenericError{Key: errKey, Value: string(errValueJSON)}
agglayerErr = &GenericError{Key: errKey, Value: string(errValueJSON)}
}
}

c.Status = InError
c.Error = ppError
c.Error = agglayerErr
default:
return errors.New("invalid status type")
}
Expand Down

0 comments on commit f995588

Please sign in to comment.