It worked, but it failed
In posting the previous post [1] I encounted an interesting bug!
It wasn't in mod_blog [2] per se, but in the hook [3] running after an entry has been added, and therein is the bug—the entry was successfully added, but the hook failed.
The hook program failed due to a compilation error that was only triggered when it ran. I took the email notification code from mod_blog and turned it into a program. I also linked to the bloging core [4] of mod_blog to avoid having to duplicate the code to read the configuration [5] (the email notification block is now ignored by mod_blog itself), and because the configuration format is Lua [6], a compiler option is needed to support Lua modules written in C—basically, -rdynamic to allow C-based Lua modules to call Lua functions (which I allow, and need, to support my particular configuration).
This is the root cause of the issue.
But in the meantime, because the hook failed to run, the script I use that uses the HTTP (HyperText Transfer Protocol) PUT method received a status of “500 Internal Server Error,” the entry was stored, but none of the statically generated files (index.html and the various feed files) were generated, nor email sent.
Once I figured out what happened, it was easily remedied, but that still leaves the question of what should happen? I intended the add entry post-hook to handle situations like notifications, so in this case, if the hook fails, normal processing should proceed, but how to send back that the entry post-hook failed? Looking over the HTTP status codes [7], perhaps I could return a “202 Accepted” when the entry post-hook fails, with some information about the failure. That could work.