Hello friends! :wave: Checking out the new <resour...
# general
m
Hello friends! 👋 Checking out the new resource hooks feature and wondering why I don't see any output with my callbacks 🧵
I don't see any output or files -- basically nothing happens. (I threw the promise in there just to debug)
Super stoked to see this feature! and just want to know how to use it
e
I think that apigateway might need re-building and re-releasing with the latest SDK so that it handles hooks correctly
Will nudge the team for it if they can do an update
m
Oh nice, that'd explain it. Thank you sir!
w
Finally got around to trying your example, and it seems to work for me. However there’s a buglet in the hook and I am getting:
Copy code
warning: after hook "after" failed: Unexpected non-whitespace character after JSON at position 4 (line 1 column 5)
I believe that’s
/date
not actually returning json, so the parsing fails. Does the warning not show up for you? I tried with 3.182 and 3.185 of the Node.js SDK. I am using the latest CLI release. There’s been a couple smaller fixes for hooks, but I think mostly in the SDKs. Maybe there was something in the CLI too though.
m
Nice, thanks @white-camera-67848! I don't think I saw that, no, but it's possible I overlooked it somehow. It does work now, though (and I do see the warning after updating everything to latest).
This is great! Very cool stuff.
Thanks for the follow-up.