This message was deleted.
# typescript
s
This message was deleted.
c
The code:
Copy code
try {
    const eksName = await aws.ssm.getParameter({
    name: "eks-name",
    });
} catch(error) {
    // handle error
    console.log(JSON.stringify(error));
}
inside of the catch block, the below will be printed:
Copy code
{
  "promise": {}
}
so it's like I don't have access to the error message, etc could be I'm just lacking some JS/TS skills as well, but I think it should be something like that
s
Copy code
const eksName = await aws.ssm.getParameter({
    name: "eks-name",
}).catch(err => console.log(err) /*handle here*/)
c
@steep-toddler-94095 even with the await there you still have to use the catch function? That's a bit counter intuitive, no? Could be I'm lacking some knowledge here as I'm not a nodejs expert
s
you're correct, you don't need the
await
for the
.catch
to work