* refactor openpitrix API Signed-off-by: hongming <talonwan@yunify.com> * add openpitrix mock client Signed-off-by: hongming <talonwan@yunify.com> * refactor tenant API Signed-off-by: hongming <talonwan@yunify.com> * refactor IAM API Signed-off-by: hongming <talonwan@yunify.com> * refactor IAM API Signed-off-by: hongming <talonwan@yunify.com>
25 lines
422 B
Go
25 lines
422 B
Go
package api
|
|
|
|
import (
|
|
"github.com/emicklei/go-restful"
|
|
"net/http"
|
|
)
|
|
|
|
func HandleInternalError(response *restful.Response, err error) {
|
|
statusCode := http.StatusInternalServerError
|
|
|
|
response.WriteError(statusCode, err)
|
|
}
|
|
|
|
func HandleBadRequest(response *restful.Response, err error) {
|
|
|
|
}
|
|
|
|
func HandleNotFound(response *restful.Response, err error) {
|
|
|
|
}
|
|
|
|
func HandleForbidden(response *restful.Response, err error) {
|
|
|
|
}
|