docs: def exception_translation(func):
      """
      Catch exception and build correct api response for it.
      """
      @wraps(func)
      def decorator(*arg, **kwargs):
          try:
              return func(*arg, **kwargs)
          except InvalidOperationException, e:
              return Response(status=status.HTTP_412_PRECONDITION_FAILED, data={'detail': e.message}, headers={'Content-Type': 'application/json'})
      return decorator