Skip to content
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

Send Exception to Discord #391

Merged
merged 2 commits into from
Jun 1, 2024
Merged

Conversation

Akkarinage
Copy link
Member

@Akkarinage Akkarinage commented Mar 17, 2024

Closes #390 .

Changes proposed in this Pull Request:

  • Makes use of Discord as a method of alerting admins to page exceptions.

This will not report generic PHP errors, only errors within the application that would throw the dreaded white page of death. I.E:
image

This change will also continue to send exceptions to Discord on each page load until the issue is resolved. This doesn't happen often enough to be an annoyance if FluxCP is configured correctly.

Discord_AsEGWp2Fdz

@Akkarinage Akkarinage added Component: Framework Component: Third-Party Testing Required This PR requires testing and feedback before merging labels Mar 17, 2024
@AraanBranco
Copy link
Contributor

Tested, but I suggest a change, adding more information to make it easier to find the error, like this:

if(Flux::config('DiscordUseWebhook')) {
		if(Flux::config('DiscordSendOnErrorException')) {
			sendtodiscord(Flux::config('DiscordWebhookURL'), '```ansi
�[2;31mERROR�[0m
Error: '. get_class($e) .'
Exception: '. $e->getMessage() .'
File: '. $e->getFile() .':'. $e->getLine() .'```');
		}
	}

Example:
image

@Akkarinage Akkarinage merged commit 09b45fa into rathena:master Jun 1, 2024
7 checks passed
@Akkarinage Akkarinage deleted the hotfix/issue390 branch June 1, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Framework Component: Third-Party Testing Required This PR requires testing and feedback before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception Alerts
2 participants