watson-developer-cloud / go-sdk

:mouse: go SDK for the IBM Watson services.
Apache License 2.0
71 stars 25 forks source link

Compare Comply ListFeedback does not work #59

Closed dpopp07 closed 4 years ago

dpopp07 commented 4 years ago

Overview What is the issue? Be concise and clear.

When invoking the ListFeedback method for Compare Comply, the response is deserialized incorrectly and this produces an error. This is either a bug in the SDK or a flaw in the example in the API ref.

Expected behavior What did you expect to happen? I expected the results to be printed to the screen as JSON.

Actual behavior What actually happened? I received the following error:

panic: An error occurred while unmarshalling the response body: 'parsing time "2019-04-02T14:11:48.938+0000": extra text: +0000'

coming from this line: panic(responseErr)

How to reproduce Help us to reproduce what you experienced. Include your code snippets (without credentials) Build and run this code as is:

package main

import (
  "encoding/json"
  "fmt"
  "github.com/IBM/go-sdk-core/core"
  "github.com/watson-developer-cloud/go-sdk/comparecomplyv1"
)

func main() {
  authenticator := &core.IamAuthenticator{
    ApiKey:     "{apikey}",
  }

  options := &comparecomplyv1.CompareComplyV1Options{
    Version: "2018-10-15",
    Authenticator: authenticator,
  }

  compareComply, compareComplyErr := comparecomplyv1.NewCompareComplyV1(options)

  if compareComplyErr != nil {
    panic(compareComplyErr)
  }

  compareComply.SetServiceURL("{url}")

  result, _, responseErr := compareComply.ListFeedback(
    &comparecomplyv1.ListFeedbackOptions{},
  )

  if responseErr != nil {
    panic(responseErr)
  }
  b, _ := json.MarshalIndent(result, "", "  ")
  fmt.Println(string(b))
}

SDK Version Please provide the SDK version here. 1.0.0

Specifically, using local clone at comming ab836657457716599066956900b6c52d0e45c970

Additional information:

ehdsouza commented 4 years ago

This looks like a service issue. Created a issue https://github.ibm.com/Watson-Discovery/compare-and-comply/issues/12182

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ehdsouza commented 4 years ago

This has been fixed in production