MCPcopy Index your code
hub / github.com/Preloading/TwitterAPIBridge / ReturnError

Function ReturnError

twitterv1/errorhandling.go:26–41  ·  view source on GitHub ↗
(c *fiber.Ctx, message string, error_code int, http_error int)

Source from the content-addressed store, hash-verified

24}
25
26func 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
43func HandleBlueskyError(c *fiber.Ctx, responseJson string, lexicon string, function func(c *fiber.Ctx) error) error {
44 // json decode responce

Callers 15

UpdateProfilePictureFunction · 0.85
SearchAheadFunction · 0.85
GetMyActivityFunction · 0.85
access_tokenFunction · 0.85
GetUsersListsFunction · 0.85
list_timelineFunction · 0.85
GetListMembersFunction · 0.85
user_timelineFunction · 0.85
media_timelineFunction · 0.85
likes_timelineFunction · 0.85
convert_timelineFunction · 0.85
RelatedResultsFunction · 0.85

Calls 1

EncodeAndSendFunction · 0.85

Tested by

no test coverage detected