You need to sign in to do that
Don't have an account?
IanDonegan
Allow apex execution to continue if there is an unauthorized endpoint?
Hello All,
We have an apex class that makes an http callout to endpoints returned by a soql query. Right now, if one of the returned endpoints does not have a Remote Site entry, the entire scheduled job fails. If there is one error, everything stops.
Is there a way to do either of these things:
1. Verify that there is a valid remote site entry for each endpoint before making the callout, so as to prevent these errors
2. Allow the execution to continue after encountering this kind of error, allowing the "approved" callouts
Thank you, to all respondants.
We have an apex class that makes an http callout to endpoints returned by a soql query. Right now, if one of the returned endpoints does not have a Remote Site entry, the entire scheduled job fails. If there is one error, everything stops.
Is there a way to do either of these things:
1. Verify that there is a valid remote site entry for each endpoint before making the callout, so as to prevent these errors
2. Allow the execution to continue after encountering this kind of error, allowing the "approved" callouts
Thank you, to all respondants.
Best Answer chosen by IanDonegan
IanDonegan
Never mind. I was able continue execution by putting the callout in a try/catch statement.