Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

grpc error #818

Open
fuqi1001 opened this issue Nov 7, 2024 · 0 comments
Open

grpc error #818

fuqi1001 opened this issue Nov 7, 2024 · 0 comments

Comments

@fuqi1001
Copy link

fuqi1001 commented Nov 7, 2024

Project board link

response.status = medusa_pb2.StatusType.UNKNOWN

I got error when the get_backups failed (due to azure blog credential config error), then the exception part also throw exception because the GetBackupsResponse doesn't have status field. Is this a bug, I think it should be something like response.overallStatus = ? right?

message GetBackupsResponse {
  repeated BackupSummary backups = 1;
  StatusType overallStatus = 2;
}
    def GetBackups(self, request, context):
        response = medusa_pb2.GetBackupsResponse()
        try:
            # cluster backups
            with Storage(config=self.storage_config) as connected_storage:
                backups = get_backups(connected_storage, self.config, True)
                for backup in backups:
                    summary = get_backup_summary(backup)
                    response.backups.append(summary)
                set_overall_status(response)

        except Exception as e:
            context.set_details("Failed to get backups due to error: {}".format(e))
            context.set_code(grpc.StatusCode.INTERNAL)
            response.status = medusa_pb2.StatusType.UNKNOWN
        return response

┆Issue is synchronized with this Jira Story by Unito
┆Issue Number: MED-104

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant