It's not entirely clear what you're asking for, but looking at the source of LWP::UserAgent, it seems like you can check the response headers to see if they include a "Client-Warning: Internal response" line -- if so, then it's an LWP-generated "fake" error. (This is defined in sub _new_response, near the end of LWP::UserAgent.)