GhostWording / gw-config-apis

this repo contains static json that can live through apis with github management only
0 stars 7 forks source link

[Bot-apis] fix UnknowBot behaviour #41

Open rhwy opened 5 years ago

rhwy commented 5 years ago

(@andreasdieryck) I have noticed an issue with some of the chatbot or 'botname' that we get though the gw-bot-apis environment

Here's a description of what happens:

  1. What we did

    • Our iOS bots called the botname 'artquest' and 'britishmuseum', to get sequences for its users. I did the same thing on Postman.
    • They use the API http://gw-bot-apis.azurewebsites.net/api/sequences/next with botname set as artquest or britishmuseum
  2. What we expected

    • We expect to get a JSON with a sequence (or, if the client has read all the sequences for the current user, a 'no more sequences available' message)
  3. What we got instead

    • Instead we get an error message an UnknownBotName
  4. How it got fixed

    • We have been able to fix this issue by calling the API http://gw-bot-apis.azurewebsites.net/admin/sequences/reload/artquest?adminkey=61fd4333-61b1-4236-83c6-33bda5a9d6e6
    • Once we reload the bot using this API, then we go back to receiving normal JSONs and the error message an UnknownBotName disappears when call http://gw-bot-apis.azurewebsites.net/api/sequences/next

The problem is that this issue seems to be recurrent: we have noticed that this happened twice already in less than 4 days. Could you look into it at some point?

rhwy commented 5 years ago

rui -> verify the exact conditions that show UnknownBotName

rhwy commented 5 years ago

for the record, the UnknownBotName happens only if I don't have the bot name in the internal memory register (this only is only written once when we load the bot).

rhwy commented 5 years ago

I can only reproduce the bug if: