(c *fiber.Ctx, message string, error_code int, http_error int)
| 24 | } |
| 25 | |
| 26 | func ReturnError(c *fiber.Ctx, message string, error_code int, http_error int) error { |
| 27 | if c.Query("suppress_response_codes") != "true" { |
| 28 | c.Status(http_error) |
| 29 | } |
| 30 | |
| 31 | err := Errors{ |
| 32 | Error: []Error{ |
| 33 | { |
| 34 | Code: error_code, |
| 35 | Message: message, |
| 36 | }, |
| 37 | }, |
| 38 | } |
| 39 | |
| 40 | return EncodeAndSend(c, err) |
| 41 | } |
| 42 | |
| 43 | func HandleBlueskyError(c *fiber.Ctx, responseJson string, lexicon string, function func(c *fiber.Ctx) error) error { |
| 44 | // json decode responce |
no test coverage detected