What is your specific application? There are several approaches or engineering methods. The first is to carefully map the size of the affected area using ultrasonic thickness testing off-line (if possible). There are also other nondestructive testing methods that can be used on-line, as well.
After obtaining the thickness data and mapping the data relative to the circumference of the pipe, the rest of the evaluation is based on some type of stress calculations using FEA to determine leak before break. One method that I would suggest is using the API 579 Fitness for Service Guidelines. This is a rather comprehensive document that provides for fitness for service evaluation based on various damage mechanisms.
Local wall thinning is one that is discussed. The API-579 is rather detailed to follow, but it is an approach that you can hang your hat on to defend your decision. Other approaches would consider FEA analysis that could cost time and money. If it was me, and you are routinely involved with these types of fitness for service calcs, get yourself a copy of API 579.