Skip to content

Bug: Route /api/desa dan /testEmail menghasilkan 500 untuk pengunjung publik #1801

Done

Description

@analisopendesa

Deskripsi

  1. GET /api/desa memanggil ->name('api.desa') pada hasil DataDesa::paginate(10) (objek paginator), bukan pada route. Method name() tidak ada pada paginator, sehingga muncul BadMethodCallException.
  2. GET /testEmail berada di luar grup auth. Untuk tamu, $request->user()->notify() melempar Error (bukan Exception), sehingga tidak tertangkap oleh try/catch di controller.

Lokasi

  • routes/web.php:1087-1089 dan :1091
  • app/Http/Controllers/TestEmailController.php

Langkah mereproduksi

Buka /api/desa dan /testEmail tanpa login.

Hasil aktual

Keduanya menghasilkan 500.

Saran perbaikan

  • Route::get('/api/desa', fn () => DataDesa::paginate(10))->name('api.desa');
  • Pindahkan /testEmail ke grup auth (atau hapus bila hanya untuk pengembangan).

Activity

  1. added
    bug
    on Nov 18, 2026
  2. added this to the M3 OpenDK 2612 milestone on Nov 18, 2026
  3. analisopendesa commented on Nov 25, 2026

    @analisopendesa
    ContributorAuthor

    Sudah diperbaiki di PR #1806

  4. added
    Tingkat: T1
    and removed on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Tingkat: T1bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions