tests for the API error handler
simplify handle_invalid_revIDs() and write associated unit tests