Skip to content

Commit c744eff

Browse files
added revamps -> used alias for OrderException and removed status code
1 parent c1122f9 commit c744eff

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Database/Adapter/MariaDB.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Utopia\Database\Exception as DatabaseException;
1212
use Utopia\Database\Exception\Duplicate as DuplicateException;
1313
use Utopia\Database\Exception\NotFound as NotFoundException;
14-
use Utopia\Database\Exception\Order;
14+
use Utopia\Database\Exception\Order as OrderException;
1515
use Utopia\Database\Exception\Timeout as TimeoutException;
1616
use Utopia\Database\Exception\Truncate as TruncateException;
1717
use Utopia\Database\Helpers\ID;
@@ -1717,7 +1717,7 @@ public function find(string $collection, array $queries = [], ?int $limit = 25,
17171717
}
17181718

17191719
if (\is_null($cursor[$originalAttribute] ?? null)) {
1720-
throw new Order("Order attribute '{$originalAttribute}' is empty", 400, null, $originalAttribute);
1720+
throw new OrderException("Order attribute '{$originalAttribute}' is empty", 0, null, $originalAttribute);
17211721
}
17221722

17231723
$binds[':cursor'] = $cursor[$originalAttribute];

src/Database/Adapter/Postgres.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Utopia\Database\Document;
1111
use Utopia\Database\Exception as DatabaseException;
1212
use Utopia\Database\Exception\Duplicate as DuplicateException;
13-
use Utopia\Database\Exception\Order;
13+
use Utopia\Database\Exception\Order as OrderException;
1414
use Utopia\Database\Exception\Timeout as TimeoutException;
1515
use Utopia\Database\Exception\Transaction as TransactionException;
1616
use Utopia\Database\Exception\Truncate as TruncateException;
@@ -1550,7 +1550,7 @@ public function find(string $collection, array $queries = [], ?int $limit = 25,
15501550
}
15511551

15521552
if (\is_null($cursor[$originalAttribute] ?? null)) {
1553-
throw new Order("Order attribute '{$originalAttribute}' is empty", 400, null, $originalAttribute);
1553+
throw new OrderException("Order attribute '{$originalAttribute}' is empty", 0, null, $originalAttribute);
15541554
}
15551555

15561556
$binds[':cursor'] = $cursor[$originalAttribute];

0 commit comments

Comments
 (0)