ApiFilter provides error handling and response formatting