F
Filament16mo ago
Scott

Show error via redirect

Hi guys, I need to show an error if something goes wrong during an oauth2 authentication flow within our app. Is there a way to show an error on redirect? E.g.
} catch (\Exception $e) {
// Log the exception message for debugging purposes
Log::error('Airtable OAuth callback error: ' . $e->getMessage());

return redirect('/admin/airtable-accounts')->with('error', 'Failed to connect with Airtable. Please try again.');
}
} catch (\Exception $e) {
// Log the exception message for debugging purposes
Log::error('Airtable OAuth callback error: ' . $e->getMessage());

return redirect('/admin/airtable-accounts')->with('error', 'Failed to connect with Airtable. Please try again.');
}
1 Reply
Patrick Boivin
Patrick Boivin16mo ago
Is this not working? Are you checking for error in the session on the destination page?
Want results from more Discord servers?
Add your server