Have a look at the API Documentation which mentions the following signature for this method:
writeAsVectorFormat(layer: QgsVectorLayer, fileName: str, fileEncoding: str, destCRS: QgsCoordinateReferenceSystem = QgsCoordinateReferenceSystem(), driverName: str = '', onlySelected: bool = False, datasourceOptions: Iterable[str] = [], layerOptions: Iterable[str] = [], skipAttributeCreation: bool = False, newFilename: str = '', symbologyExport: QgsVectorFileWriter.SymbologyExport = QgsVectorFileWriter.NoSymbology, symbologyScale: float = 1, filterExtent: QgsRectangle = None, overrideGeometryType: QgsWkbTypes.Type = QgsWkbTypes.Unknown, forceMulti: bool = False, includeZ: bool = False, attributes: Iterable[int] = [], fieldValueConverter: QgsVectorFileWriter.FieldValueConverter = None) → Tuple[QgsVectorFileWriter.WriterError, str]
The last part is interesting here, it's the return value: → Tuple[QgsVectorFileWriter.WriterError, str]
Tuples can be read like this:
error, error_string = QgsVectorFileWriter.writeAsVectorFormat(....)
so you probably want to use something like this
error, error_string = QgsVectorFileWriter.writeAsVectorFormat(....)
if error != QgsVectorFileWriter.NoError:
print('Oh an error has happened: {details}'.format(details=error_string))