-2

Through Bitbucket, I'm passing an environmental variable object through the development tab that looks similarly to:

{ "var1": "tets.var.com", "port": "34", "username": "john", "password": "pass", "env": "dev" }

I am also passing these variables through my Bitbucket pipeline as:

npx cdk deploy app --require-approval never -c credentials="$BITBUCKET_CRED"

However, when invoking my lambda with the credentials, I am getting the error:

"SyntaxError: Unexpected token \\ in JSON at position 2"

Samuel Lawrence
  • 253
  • 2
  • 12

1 Answers1

-1

My problem was that the object I passed in was too long, hence the "//" in the response. I'm assuming the "//n" was left off

Samuel Lawrence
  • 253
  • 2
  • 12
  • I'm sure you've fixed the problem but this answer doesn't seem to clearly describe the root cause. – jarmod Aug 08 '22 at 13:01