fix providerapi exception usage/construction