Adding error codes and modifying request validation logic with stringutils