Fix from_response method in error class