Skip to content

Replace log.Fatalf with error return in provider/server.go #937

@coderabbitai

Description

@coderabbitai

Context

In PR #860, a code review identified that provider/server.go calls log.Fatalf when gs.Serve(listen) returns an error (around lines 145-147). This exits the entire process and bypasses callers' control and cleanup logic.

Problem

log.Fatalf should not be used in library code as it prevents proper error handling and cleanup by callers.

Requested Change

The function should return the error to the caller instead of calling log.Fatalf, allowing the caller to handle cleanup appropriately.

References

Metadata

Metadata

Assignees

Labels

needs-kindIndicates an issue or PR lacks a `kind/foo` label and requires one.needs-priorityIndicates an issue or PR lacks a `priority/foo` label and requires one.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

Type

No type

Projects

Status

🆕 New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions