Skip to content

InvalidArgumentException: Order direction must be "asc" or "desc". #92

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

Open
sentry-io bot opened this issue Apr 10, 2025 · 0 comments · May be fixed by #93
Open

InvalidArgumentException: Order direction must be "asc" or "desc". #92

sentry-io bot opened this issue Apr 10, 2025 · 0 comments · May be fixed by #93
Assignees
Labels
🐛 bug Something isn't working

Comments

@sentry-io
Copy link

sentry-io bot commented Apr 10, 2025

Sentry Issue: OBDB-API-LARAVEL-8

InvalidArgumentException: Order direction must be "asc" or "desc".
  File "/app/Models/Traits/V1/BreweryFilters.php", line 84, in App\Models\Brewery::{closure:App\Models\Traits\V1\BreweryFilters::scopeApplySorts():74}
    $query->orderBy($value[0], $value[1] ?? 'asc');
  File "/app/Models/Traits/V1/BreweryFilters.php", line 74, in App\Models\Brewery::scopeApplySorts
    ->when($request->has('sort'), function (Builder $query) use ($request) {
  File "/app/Http/Controllers/Api/V1/ListBreweries.php", line 39, in App\Http\Controllers\Api\V1\ListBreweries::__invoke
    ->applySorts($request)
  File "/public/index.php", line 17
    ->handleRequest(Request::capture());
...
(55 additional frame(s) were not displayed)
@sentry-io sentry-io bot added the 🐛 bug Something isn't working label Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
1 participant