-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
In error situations when OC returns a raw string response body instead of a json response, the sdk method ThrowAuthExceptionAsync throws a not very helpful error "Object reference not set to an instance ....".
Here's code to re-create this error.
> var oc = new OrderCloudClient(new OrderCloudClientConfig()
> {
> ApiUrl = "https://sandboxapi.ordercloud.io/v1",
> AuthUrl = "https://sandboxapi.ordercloud.io/v1",
> ClientId = _settings.OrderCloudSettings.ClientID,
> ClientSecret = _settings.OrderCloudSettings.ClientSecret,
> Roles = new[] { ApiRole.FullAccess }
> });
>
> var token = await oc.AuthenticateAsync();
The "/v1" in the url is incorrect and results in a response "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable." from OC.
Metadata
Metadata
Assignees
Labels
No labels