The apex:actionFunction has oncomplete handler according to this https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_actionFunction.htm. But I cannot find "onerror" handler in the list, or there are other patterns to handle exceptions from server side?
There's no such thing, because an uncaught exception (e.g. an error) will cause the Visualforce screen of death:
If you want more control over potentially fatal situations, consider using Remoting or actionFunctions instead; you should be able to use a normal try-catch block to catch and handle any exceptions you receive this way.