FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date. Fauna accounts created after August 21, 2024 must use FQL v10. These accounts will not be able to run FQL v4 queries or access the v4 Dashboard. For more details, see the v4 EOL announcement and migration guide. Contact support@fauna.com with any questions. |
Abort
This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics. |
Abort( message )
abort( message )
Abort( message )
Abort( message )
Abort( message )
Abort( message )
Description
The Abort
function terminates the current transaction and
augments the returned error with the associated message. Any
modifications to data or schema in the aborted transaction are ignored,
even if this modification took place before the abort function was
executed.
Examples
The following query is a single transaction with three statements. The
first statement creates a collection, the second statement adds an
document to the collection, and the third statement aborts the
transaction. Due to the transaction being terminated by the Abort
call, neither the creation of the collection nor the addition of the
document is present in the database.
Error: [BadRequest] transaction aborted: Reset Transaction
Error: <class 'faunadb.errors.BadRequest'> ErrorData(code='transaction aborted', description='Reset Transaction', position=[2], failures=None)
Response error 400. Errors: [](transaction aborted): Reset Transaction, details: []
ERROR: transaction aborted: Reset Transaction
ERROR com.faunadb.client.errors.BadRequestException: transaction aborted: Reset Transaction
{
errors: [
{
position: [
2
],
code: 'transaction aborted',
description: 'Reset Transaction'
}
]
}
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!