urlwatch icon indicating copy to clipboard operation
urlwatch copied to clipboard

Don't always count an HTTP error 404 as a change

Open schildbach opened this issue 5 years ago • 7 comments

I want to monitor a not yet existing URL for something to appear. Unfortunately currently each request will trigger a change, regardless of if it just again returned the same 404 error. So in short, if the error doesn't change, then please don't count it as a change. If it goes from error to no error (or the other way round), then it would be a change indeed.

schildbach avatar Oct 18 '18 20:10 schildbach

btw. I tried the Debian package 2.14-1.

schildbach avatar Oct 19 '18 07:10 schildbach

You can set the config option display / error to false, although this at the moment is a global setting, so any other errors will also be ignored and not shown.

thp avatar Oct 23 '18 18:10 thp

Does ignore_connection_errors work for you?

cfbao avatar Nov 10 '18 04:11 cfbao

@cfbao It's not a full workaround. Yes it seems to detect going from 404 to some content. But not the other way round.

schildbach avatar Nov 10 '18 16:11 schildbach

Would an option like treat_error_as_content work then? So errors wouldn't be handled in a special way. When you have consecutive errors, no notice would be fired as long as they have the same messages. But changing between error & non-error content would trigger a change report.

cfbao avatar Nov 10 '18 21:11 cfbao

Yes, that's exactly what I tried to propose. At least for an HTTP 404 error.

(I'm not so sure about other HTTP errors; I think for example the 5xx category should not trigger a content change.)

schildbach avatar Nov 11 '18 12:11 schildbach

HTTP 403 (Forbidden) is also one of these errors that should count as content. For example, for one of my watched pages the content changed from HTTP 404 to HTTP 403. That's a very important information I'd like to be notified about.

schildbach avatar Nov 16 '18 10:11 schildbach