Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def decode_exception(e, identify_phase=False):
if isinstance(e, LangDetectException):
return LangStringStatus.CANNOT_IDENTIFY, str(e)
return LangStringStatus.UNKNOWN_ERROR, str(e)