I'm new to plugin building. I would like to have the plugin return a 404 status code when the user didn't provide the correct parameter. Other than setting
$app->response_code(404);
$app->response_message("Not Found");
What should I be doing?
Reported on Movable Type 4.3

If you want to stop the user dead in their tracks with an error screen, the fastest way is to use the Perl die function.
die("Wrong input.")
Try it out. It'll give your users a Movable Type-flavored error screen with the message.
Thanks Mike. :)
But I was hoping to send a 404 response code so that Apache can take over and redirect to the designated 404 page based on the .htacess configurations. Somehow when I try to do
return @app->send_http_header();
with the parameters above, nothing seems to be working. Yikes~
[But I was hoping to send a 404 response code so that Apache can take over and redirect to the designated 404 page based on the .htacess configurations. Somehow when I try to do]
I am also stuck here
Since it's a development-related question, you can ask it on the MTOS-dev mailing list and be reasonably on topic.
Ok! I'd give it a try. Thank Mike! :)