1
Commit Graph

16 Commits

Author SHA1 Message Date
Andrew Privalov
addc1c9e3a
add option UseTestEnvironment (#109)
* add option `UseTestEnvironment` #89

* add test
2024-08-22 11:45:37 +03:00
Renato Saksanni
9b4caace93
Add golangci-lint configuration and fix linting issues (#97)
Add golangci-lint using official golangci action and fix linting issues
2024-07-08 17:57:08 +03:00
Ehson
e65d48be16
Added error handling for specific error codes (#69)
* Added error handling for specific error codes

* added TooManyRequestsError witch have retry_after

* Added a parameters field with retry_after and handled error code 429

* added example of handling TooManyRequestsError with RetryAfter

* fix: changed description

* fix: used switch statement instead of if statement

* add MigrateError type and IsMigrateError function

* updated apiResponse struct and error handling logic

* fix: changed from %w to %s to ensure proper functionality of Sprintf

* fix: correct error message in getMe test

---------

Co-authored-by: Ehson <priler05@gmail.com>
Co-authored-by: usmonzodasomon <budushiyprogrammist@gmail.com>
2024-04-03 10:45:48 +03:00
Negasus
1f29bed497 return ErrorForbidden for error code 403 2024-03-11 11:27:27 +03:00
Negasus
b71ba48e0c add debug handler option 2023-04-13 11:39:58 +03:00
Negasus
098c42edcf Send http.NoBody if all params fields are empty. For example, method getMyCommands has not required fields 2023-02-10 13:01:01 +03:00
Andrew Privalov
2d86115e4b
Tests (#12)
* remove handlerType param from RegisterHandlerMatchFunc

* change ChatID to `any` for StopMessageLiveLocationParams

* check rawRequest param by reflect isNil

* wip: add tests

* add methods tests
2023-01-19 10:59:16 +03:00
Negasus
436e67cd77 refactoring, add missing sticker methods 2022-05-06 12:47:43 +03:00
Negasus
66493b12e5 remove validation because telegram backend validate more completly and correct 2022-05-02 16:43:00 +03:00
Negasus
11aaf20095 build request form refactoring 2022-05-02 15:53:14 +03:00
Negasus
28b72956de validation refactoring, InputMedia group attachment implementation 2022-04-29 19:04:38 +03:00
Negasus
d531c8b234 support all methods, wip validation 2022-04-29 12:21:42 +03:00
Negasus
5db950b6b5 remove debug log message for getUpdates and empty updates resposne, fix 2022-04-26 20:01:16 +03:00
Negasus
6138f4aa60 remove debug log message for getUpdates and empty updates resposne 2022-04-26 19:49:13 +03:00
Negasus
08fb478e36 add debug check 2022-04-26 15:36:00 +03:00
Negasus
a030f389d9 initial 2022-04-25 19:02:51 +03:00