Skip to content

Commit

Permalink
Update hostname requirements in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
denny241 committed Jun 18, 2021
1 parent 6934618 commit 55bb655
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/pkg/apiclient/apiclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ func RegisterSite(publicKey ssh.PublicKey, requestedSiteID string) (*Registratio
Message: errorResponse.Message,
Details: `The given hostname didn't match the requirements:
- Starts with a letter
- Contains only small letters and numbers`,
- Contains only small letters, numbers and single dashes (-) between them
- Ends with a small letter or number`,
StatusCode: resp.StatusCode,
}
case http.StatusUnauthorized:
Expand Down Expand Up @@ -161,7 +162,8 @@ func RegisterSite(publicKey ssh.PublicKey, requestedSiteID string) (*Registratio
Message: errorResponse.Message,
Details: `The given hostname didn't match the requirements:
- Starts with a letter
- Contains only small letters and numbers
- Contains only small letters, numbers and single dashes (-) between them
- Ends with a small letter or number
- Minimum 6 characters (not applicable for premium users`,
StatusCode: resp.StatusCode,
}
Expand Down

0 comments on commit 55bb655

Please sign in to comment.