-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DELETE /instances/{instancesId} endpoint throws an error even after removing the instance from the database #146
Comments
hey @dmahajan980! Could you perhaps set up a minimal set of lines to reproduce this? e.g. create an instance then delete it, so we can try copying/pasting this? (this would also make a great unit test!) |
Hi @yochannah I have written a test case for this while writing the tests for issue #118
Written using jest and to be placed in the |
@yochannah I ran the above test file and by modifying the DELETE router code at line no. 107, it seems to work fine. This is the currently existing code for the DELETE /instances/{instancesId} endpoint: Notice when I simply change the code on line no. 107 as follows This code passes both the above mentioned test cases as shown below: |
While running some tests for the

DELETE /instances/{instancesId}
the app throws the following error:On observing the database, the instance for which the request was made seemed to have been removed successfully from the database.
I think that we are trying to store the no of items removed from the database inside of

n_removed
which seems to be done in an incorrect manner. Because when I log theinfo
object to the console, the console shows the following key-value pairs:The text was updated successfully, but these errors were encountered: