You need to sign in to do that
Don't have an account?

Random authorization required
I have a public site setup, but I've started getting random reports of users seeing the authorization required page. I have all inserts/updates wrapped in try catch statements, but I haven't been able to replicate the problem to see the error in a debug log.
Is there a better way to catch random errors like this? Maybe if the user hits the authorization required page, email everything to me or something?
I'm a beginner with APEX so forgive my ignorance.
Is there a better way to catch random errors like this? Maybe if the user hits the authorization required page, email everything to me or something?
I'm a beginner with APEX so forgive my ignorance.
The user can try now and receive an error, but try again later and have it work perfectly.
We get authorization required message, even if the visual force page/controller faced some errors.
Option 1 - If you can reproduce the random occurence of the error.
Put Try{ } Catch{} statements in ur code in all the functions and in the catch, write System.Debug(e.getMessage();
Enable Debugging for Site User(get this user from public access settings of the site->profile->user id.
reproduce the error, this will log the error in debug logs.
fix the code.
Option 2: - You cannot reproduce the error but happens only at customer/user end.
Instead of system.debug in you catch, write code to send an email to u with the error message.
When u get the email with error message, fix it and deploy.
********************************
Hope this helps!
JG