Added a try/catch to avoid a fatal error for when the credentials are not configured.