Merge "Fix the exception thrown when API called bug" into main