mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-21 13:23:03 +01:00
This features adds rfc7807 Problem detail responses when an error happens processing a request. This will greatly improve the common issues with "blank pages" and "404 pages" issues which should now properly tell the user what input was wrong (group that does not exist, container name that does not exist, etc.)
23 lines
405 B
Go
23 lines
405 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/sablierapp/sablier/app"
|
|
"github.com/spf13/cobra"
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
var newStartCommand = func() *cobra.Command {
|
|
return &cobra.Command{
|
|
Use: "start",
|
|
Short: "Start the Sablier server",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
viper.Unmarshal(&conf)
|
|
|
|
err := app.Start(cmd.Context(), conf)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
},
|
|
}
|
|
}
|