Skip to content
Advertisement

Tag: crud

FASTAPI Delete Operation giving Internal server error

I have this code for delete operation on a Postgresql DB: The create and read operations work fine. If I pass an existing or a non-exsiting id to delete, I get a 500 Internal Server error. The row does get deleted from the table though. If I comment this line deleted_post = cursor.fetchone(), it works okay. Here is the error

Advertisement