Forum Discussion
What's the purpose of the catch block in an ASM_REQUEST_BLOCKING scenario
We're returning custom ASM-error pages by using an irule whose initial structure follows the principle of the article ASM_REQUEST_BLOCKING.
Some month ago i decided to remove the last block 'when HTTP_RESPONSE_RELEASE'. Today i temporarily re-added it and was quite surprised about the log entries. Although the irule works as expected, the content of the catch block is getting executed.
How do i identify the typ of the exception thrown by the irule? And what action should it take in this case, since everything works fine?
- Kevin_StewartEmployee
You can use the more complete form of catch to return the resulting error:
if { [catch { do only if previous was event ASM_REQUEST_BLOCKING if { $activeViolation } { modify respose header HTTP::header remove Content-Length HTTP::header insert header_1 value_1 } } err] } { log local0. "Error is ${err}" }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com