| 114 | |
| 115 | |
| 116 | def construct_cli_error_handlers_chain(session=None): |
| 117 | # UnknownArgumentErrorHandler and InterruptExceptionHandler are |
| 118 | # intentionally excluded from structured formatting |
| 119 | handlers = [ |
| 120 | ParamValidationErrorsHandler(session), |
| 121 | UnknownArgumentErrorHandler(), |
| 122 | ConfigurationErrorHandler(session), |
| 123 | NoRegionErrorHandler(session), |
| 124 | NoCredentialsErrorHandler(session), |
| 125 | PagerErrorHandler(session), |
| 126 | InterruptExceptionHandler(), |
| 127 | ClientErrorHandler(session), |
| 128 | GeneralExceptionHandler(session), |
| 129 | ] |
| 130 | return ChainedExceptionHandler(exception_handlers=handlers) |
| 131 | |
| 132 | |
| 133 | class BaseExceptionHandler: |