async def METHOD_NAME(self, payload: dict, in_edge=None) -> Result:
    dot = self._get_dot_accessor(payload)
    contact_id = dot[self.config.contact_id]
    try:
        await self.actions[self.config.action](contact_id, self.config.segment)
        return Result(port="success", value=payload)
    except MauticClientAuthException:
        try:
            await self.client.update_token()
            await self.actions[self.config.action](contact_id, self.config.segment)
            if self.debug:
                self.resource.credentials.test = self.client.credentials
            else:
                self.resource.credentials.production = self.client.credentials
            await resource_db.save_record(self.resource)
            return Result(port="success", value=payload)
        except MauticClientAuthException as e:
            return Result(port="error", value={"error": str(e), "msg": ""})
        except StorageException as e:
            return Result(port="error", value={"error": "Plugin was unable to update credentials.", "msg": str(e)})
        except MauticClientException as e:
            return Result(port="error", value={"error": "Mautic API error", "msg": str(e)})
    except MauticClientException as e:
        return Result(port="error", value={"error": "Mautic API error", "msg": str(e)})