Amended queue logic

- Requests are queued only if they fail (not always queued then removed)
- Added an array to identify which server errors should trigger
queueing.