Can't use invokeurl in Validation rule function?

Can't use invokeurl in Validation rule function?

Hi, I've got a validation rule looking up an error table to return the error message, but it's not working. 
The error is:
Oops! Something went wrong.
Please try again or check out for following reasons:
Please check your function for any possible failed case
Please check your function for any loop that might take time to respond

See code:
  1. entityMap = crmAPIRequest.toMap().get("record");
  2. wIfValid = True;
  3. wErrorNo = 0;
  4. zStage = entityMap.get("Stage");
  5. response = Map();
  6. if(zStage == "400")
  7. {
  8. wIfValid = False;
  9. wErrorNo = 1;
  10. mErrorParams = Map();
  11. mErrorParams.put("wErrorNo",wErrorNo);
  12. resp = invokeurl
  13. [
  14. url :"https://www.zohoapis.com/crm/v2/functions/devvalderrortable/actions/execute?auth_type=oauth"
  15. type :GET
  16. parameters:mErrorParams
  17. connection:"crmall"
  18. ];
  19. }
  20. if(wIfValid == True)
  21. {
  22. response.put('status','success');
  23. }
  24. else if(wIfValid == False)
  25. {
  26. response.put('status','Failed');
  27. response.put('message',resp);
  28. }
  29. return response;

Thanks
Levi