Return code is used to show whether a processing is succeeded or not. If the processing is not succeeded, return code shows error type.
Return code is used in C API and query API. You can check return code via grn_ctx_t::rc in C API. You can check return code by looking the header element in query API. See Output format about the header element in query API.
Here is a list of return codes. GRN_SUCCESS (= 0) means that the processing is succeeded. Return codes that have negative value show error type. GRN_END_OF_DATA is a special return code. It is used only C API. It is not showen in query API.