Posts

Showing posts from January, 2019

AWS SAM/Api Gateway is swallowing my errors!?

AWS SAM is a great tool that has made my life so much easier when building Lambda functions that are accessible through API Gateway. The one thing that has caught me out a couple of times is I don't get errors returned through API gateway when using the Node JS starter from $ sam init .  As I'm testing I find a bug, as hard as I try I just cant manage to work out that "Just don't write bugs" coding strategy.  When I hit the bug I'm expecting to see the error as the response in Postman because of this block: } catch (err) { console.log(err); return err; } What I get though is a 504 response with no body. While this is part of the starter if you want to return the value through API gateway when an unexpected error occurs you need to have the error wrapped in the same format as the body in the starter.  Like this: } catch (err) { console.log(err); return { statusCode: 500 , body: JSON.string...

2018 review & 2019 goals

At the very end of 2017 I put together a quick blog post listed down some goals for things that I would like to achieve in 2018.  Now that we've ticked into 2019 I want to review what I put down and list out some new goals for 2019. 2018 in review Looking at the goals I set I did pretty well over all. Reviewing:  Speak More I managed, I gave several talks around Newcastle, got selected to speak at DDD Sydney for the 2nd year running and got selected to speak at NDC Sydney.  Submit More  I managed to Submit to more than 5 conferences and was selected for 2 different talks.  Keep Coding &  Keep Working I did both of these things. I'm still happily employed at nib and am still in a role that has me focused on code and systems development. I did fall down when it comes to  Blog More . I only published 6 blogs last year, where ideally I would have liked to have published 12. Overall 2018 went well I achieved a lot of the goals I set ou...