Add option for API error reporting

This makes API error reporting disabled by default.