Skip to content

Commit

Permalink
Fix linting error and cleanup error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dmgardiner25 committed Jan 4, 2023
1 parent 1e75a74 commit faabdc2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/codespaces/rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ func StartSSHServerWithOptions(ctx context.Context, session *liveshare.Session,

func StartJupyterServer(ctx context.Context, session *liveshare.Session) (int, string, error) {
client, err := connectToGRPCServer(ctx, session, "")
if err != nil {
return 0, "", err
}

ctx, cancel := context.WithTimeout(ctx, grpc.RequestTimeout)
defer cancel()

serverPort, serverUrl, err := client.StartJupyterServer(ctx)
if err != nil {
return 0, "", fmt.Errorf("failed to start JupyterLab server: %w", err)
return 0, "", err
}

return serverPort, serverUrl, nil
Expand Down

0 comments on commit faabdc2

Please sign in to comment.