Changed return error to array of errors, implemented returned error for Typefunc and client request, and added one test for error