To my opinion the best way is to define them in different modules( ApiError and InternalError for example)
In this case we'll got:
Targetprocess::ApiError::BadRequest    
                          and
Targetprocess::InternalError::ConfigurationError