This is a normal case while discovering the services/characteristics. If the client wants to discover all the primary services on a server then this discover procedure is successfully completed when ATTRIBUTE_NOT_FOUND error is received. Please refer to the BLE Core Spec 4.2, Volume 3, Part G, Section 4.4/4.5/4.6/4.7 for more information.
This sub procedure is complete when the Error Response is received and the Error Code is set to «Attribute Not Found» or when the End Group Handle in the Read by Type Group Response is 0xFFFF.
Thank you Yugandhar. It sounds reasonable, I also read the related parts from the BLE spec and got clarified.