func FromError(err error) *Error {
	if err == nil {
		return nil
	}
	if verr, ok := err.(*Error); ok && verr != nil {
		return verr
	}
	return Parse(err.Error())
}
FromError try to convert go error to *Error
package errors
import (
	"encoding/json"
	"fmt"
	"net/http"
)
type Error struct {
	Id     string
	Code   int32
	Detail string
	Status string
}
func (e *Error) Error() string {
	b, _ := json.Marshal(e)
	return string(b)
}
func New(id, detail string, code int32) error {
	return &Error{
		Id:     id,
		Code:   code,
		Detail: detail,
		Status: http.StatusText(int(code)),
	}
}