-
Notifications
You must be signed in to change notification settings - Fork 79
Control error reporting via a LocalizationProvider prop #411
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
Comments
I have a real world use case for this. It's common to configure production error reporting to ignore anything at warning level or below. This is an example of a function taking an error that would capture the key miss logging at error level: const reportError = (fluentKeyMissWarning) => {
Dashboard.withScope((scope) => {
scope.setLevel("error");
Dashboard.captureException(fluentKeyMissWarning);
});
} |
I would like to be able to ignore missing id errors in some cases, to avoid logging them to the console. Is there a status update for this? AFAIK there is no way to do this yet. |
Because: * We should allow users to control if reportErrors are reported or not. This commit: * Adds a class property to ReactLocalization to enable/disable logging in reportErrors. * Allows <LocalizationProvider> to enable/disable error reporting Closes: projectfluent#411
Because: * We should allow users the ability to provide a reportError function. This commit: * Adds a class property, reportError, to ReactLocalization that allows consumers to provide a function on initialization to report errors. By default the errors will console.warn. Closes: projectfluent#411
Because: * We should allow users the ability to provide a reportError function. This commit: * Adds a class property, reportError, to ReactLocalization that allows consumers to provide a function on initialization to report errors. By default the errors will console.warn. Closes: projectfluent#411
Because: * We should allow users the ability to provide a reportError function. This commit: * Adds a class property, reportError, to ReactLocalization that allows consumers to provide a function on initialization to report errors. By default the errors will console.warn. Closes: #411
We should allow users to control exactly how formatting errors are handled in
Localized
andgetString
. We could do it via a<LocalizationProvider reportError={...}>
prop, which is a function taking an error.The text was updated successfully, but these errors were encountered: