Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

15
  • How did you arrive at this assumption, i.e. how are you testing/verifying your code? Commented Aug 28, 2018 at 16:33
  • 1
    Note in your try block you don't return anything if your if statement fails Commented Aug 28, 2018 at 16:34
  • i have debug mode on its assinging undefined to custObject Commented Aug 28, 2018 at 16:34
  • 5
    My guess is the typo: data.Header.StatusCode === "2200" should be data.Header.StatusCode === "200". This is causing your response not to return, thus causing undefined. Commented Aug 28, 2018 at 16:34
  • 2
    Is data.Header.StatusCode definitely a string, or could something be converting it to a number, causing the === comparison to evaluate to false? Commented Aug 28, 2018 at 16:36