caplin: Fix nil
panic during error handling
#13333
Merged
nil
panic during error handling
#13333