prompt-injection icon indicating copy to clipboard operation
prompt-injection copied to clipboard

Map unhappy paths in application

Open chriswilty opened this issue 2 years ago • 2 comments

Make list of all the unhappy paths of app. Determine which paths are handled already. Priotitise the remaining paths according to how likely they are to occur, and how much damage they will cause if unhandled. Write tickets to implement

Unhappy paths:

  • [ ] OpenAI rate limiting #493
  • [ ] more....

chriswilty avatar Nov 03 '23 12:11 chriswilty

May want an error code system to be able to show specific backend errors to the users. After we identify the unhappy paths, we can assign error codes to some of them.

gsproston-scottlogic avatar Nov 07 '23 10:11 gsproston-scottlogic

For rate limiting:

Turns out the open AI API has some rate limiting. When you hit your limit, all the user can see in the front end is the generic "couldn't get reply from chatGPT" or similar. I think we should give a more descriptive error message, so that user knows to leave it a minute before trying again.

This could use some UI input, but we could implement our best guess in the meantime.

Clues: we have a try/catch block in handleChatError() in backend/src/router.ts. When we hit our rate limit, we enter the catch block, and the error object includes status: 429 and statusText: "Too Many Requests".

gsproston-scottlogic avatar Nov 22 '23 14:11 gsproston-scottlogic