Forum OpenACS Development: Handling Errors over HTTP

Collapse
Posted by Malte Sussdorff on
While writing the general approach to import messages from the translation server I realized that not all packages are installed on the translation server that have a catalog directory (e.g. like assessment) 😊.

So, whenever I query the translation server with a not installed package it throws back a server error. No problem I can catch that error and not process any further. But this is not a good solution.

Therefore my idea is to check if the package is installed on the translation server and contains messages. If yes, return the messages, otherwise return some string. On import I'd check if this the response was made up of this string and if yes, skip the import, otherwise import normally.

Question: Is this the usual way, or should I go with HTTP status codes. And if I go with HTTP status codes (e.g. 403/404), how can I detect them with ad_httpget.