forked from railwayapp/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
20 lines (16 loc) · 1.03 KB
/
Copy pathmain.go
File metadata and controls
20 lines (16 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package errors
import (
"errors"
"fmt"
"github.com/railwayapp/cli/ui"
)
type RailwayError error
var (
UserConfigNotFound RailwayError = errors.New(fmt.Sprintf("%s", ui.RedText("Not logged in. Please run railway login.")))
ProjectConfigNotFound RailwayError = errors.New(fmt.Sprintf("%s", ui.RedText("Not connected to a project. Run railway init to get started.")))
ProjectNotFound RailwayError = errors.New(fmt.Sprintf("%s", ui.RedText("Project not found.")))
ProblemFetchingProjects RailwayError = errors.New(fmt.Sprintf("%s", ui.RedText("There was a problem fetching your projects")))
ProjectCreateFailed RailwayError = errors.New(fmt.Sprintf("%s", ui.RedText("There was a problem creating the project")))
ProductionTokenNotSet RailwayError = errors.New(fmt.Sprintf("%s", ui.RedText("RAILWAY_TOKEN environment variable not set")))
CommandNotSpecified RailwayError = errors.New(fmt.Sprintf("Specify a command to run in side the railway environment.\n%s %s", ui.Bold("railway run"), ui.MagentaText("<cmd>")))
)