Martin Atkins (mart) wrote in lj_dev,
Martin Atkins
mart
lj_dev

Patch: Make error messages nicer

This patch tidies up the output from some error messages LiveJournal produces due to URL types which different account types do not allow. In particular, they now all feature a link to the user's canonical journal URL (as suggested by andrewheadley), and have nicer HTML output, which I noticed needed to be done again thanks to andrewheadley.

It also makes bad arguments decline to Apache so that Apache can return its own "404 Not Found" message. My reasoning behind this is that I'm thinking about writing a generic "error handler" BML page which can pull in text from the translation system, and allowing Apache to supply the not found message means that if an ErrorDocument directive is present, it'll be used when the journal arguments are bad, thus giving a user the error in their preferred language.

Tested almost completely. User vanity domains were not tested because goathack's DNS settings don't allow them to work without a lot of messing around by me, and I've not changed the logic at all anyway so it should still work exactly the same as before aside from the HTML returned.

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments