When creating a book using create_book endpoint, should an exception occur in the metadata handling, the function is halted but the Book entry, which is created first, is still present.
The @database.transaction() is thus not doing what we'd expect: rollback every query from that function should an exception be raised.
This happens on online version which is using mariadb upon pymysql.err.IntegrityError: (1062, "Duplicate entry 'Creator-wikipedia_fa_top' for key 'uc_titles_metadata_name_title'")
When creating a book using
create_book
endpoint, should an exception occur in the metadata handling, the function is halted but theBook
entry, which is created first, is still present.The
@database.transaction()
is thus not doing what we'd expect: rollback every query from that function should an exception be raised.This happens on online version which is using mariadb upon
pymysql.err.IntegrityError: (1062, "Duplicate entry 'Creator-wikipedia_fa_top' for key 'uc_titles_metadata_name_title'")