* Transforms the fields in a ValidationError from number to string * @param {Object!} error a ValidationError whose values are numeric * @return {Object!}
(error)
| 58 | * @return {Object!} |
| 59 | */ |
| 60 | function stringifyValidationErrorFields(error) { |
| 61 | return { |
| 62 | ...error, |
| 63 | params: error.paramsList, |
| 64 | severity: SEVERITY.nameByNumber.get(error.severity), |
| 65 | code: CODE.nameByNumber.get(error.code), |
| 66 | }; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Creates a ValidationError by transforming the fields from string to number |