(c *context.APIContext, err error)
| 60 | } |
| 61 | |
| 62 | func HandleCheckKeyStringError(c *context.APIContext, err error) { |
| 63 | if database.IsErrKeyUnableVerify(err) { |
| 64 | c.ErrorStatus(http.StatusUnprocessableEntity, errors.New("Unable to verify key content")) |
| 65 | } else { |
| 66 | c.ErrorStatus(http.StatusUnprocessableEntity, errors.Wrap(err, "Invalid key content: %v")) |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | func HandleAddKeyError(c *context.APIContext, err error) { |
| 71 | switch { |
no test coverage detected