Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Create interaction without response causes runtime error #53

Closed
AllanHodkinson opened this issue Feb 9, 2021 · 1 comment
Closed

Create interaction without response causes runtime error #53

AllanHodkinson opened this issue Feb 9, 2021 · 1 comment

Comments

@AllanHodkinson
Copy link
Contributor

The return type of the persistence component create method is of type GenericResponse. The response element is optional, if it's not present we get an undefined runtime error from this line of code:

Solution is to test for existence of response before testing for for existence of response.meta.
I think that the Express response .send should work as expected if response is undefined.

@nguyen102
Copy link
Contributor

Thank you for bringing this up and the PR to fix it. Closing this GH Issue as this is now resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants