Dear all. Trying to use the following (test) inlin...
# prisma-whats-new
y
Dear all. Trying to use the following (test) inline code in my SSS function
n
@yolen hey, what if you do
return fetch...
instead?
y
When I do return fetch
Copy code
onst fetch = require('isomorphic-fetch')
module.exports = function (event) {
  console.log('inside')
 //horse = fetch('<https://jsonplaceholder.typicode.com/users/>')
  return fetch('<https://onlaw.dk>')
 .then(response => {
   console.log('inside fetch')
   console.log(response)
})
(tried with different url's) i get
Copy code
CODE
400
MESSAGE
Converting circular structure to JSON
ERROR
Script returned an error.
TypeError: Converting circular structure to JSON
at Object.stringify (native)
at Console.fnLog [as log] (/data/io/0ebbdbaf494b473eb8c6a65f696df3d4/webtask.js:19:64)
at /data/io/0ebbdbaf494b473eb8c6a65f696df3d4/webtask.js:9:12
at process._tickDomainCallback (node.js:412:9)
h
Try logging response.text() instead?
I also had a lot of trouble using fetch in SSS. Fetching in a SSS seems to work differently than in any other function