h-alice / taipeion_chatbot

0 stars 0 forks source link

Proper error handling while failed api-platform authentication. #5

Open h-alice opened 3 days ago

h-alice commented 3 days ago

The chatbot instance should throw, or at least, not "ignore" while failed attempt on api-platform authentication.

h-alice commented 3 days ago

It happened since both the token request method and sign block request method returns (string, error) tuple, while the occurred errors may not be handled properly by ignoring method returns.

https://github.com/h-alice/taipeion_chatbot/blob/2ec3dfd2d93c6372c9446de88f08826947c7d0aa/server.go#L122

https://github.com/h-alice/tcg-api-platform-client/blob/4c28e3582d2292b86cee10098c476ac802661ede/api_client.go#L28