add appropriate throws declarations to ApiProvider
add appropriate throws declarations to StatefulApiProvider