Registering required RPs from template metadata (1588437)

Is there a specific exception to catch instead of generic one?