Added getError method to Response class

Add phpunity test