Add ErrorHandler to UnimplementedServers
This commit is contained in:
parent
b0f51d88c7
commit
756881cf14
@ -47,12 +47,14 @@ func (r CallbackResponse) Response() router.Response {
|
||||
return &r
|
||||
}
|
||||
|
||||
type UnimplementedCallbackServer struct{}
|
||||
type UnimplementedCallbackServer struct {
|
||||
*ErrorHandler
|
||||
}
|
||||
|
||||
func (UnimplementedCallbackServer) mustEmbedUnimplementedCallbackServer() {}
|
||||
|
||||
func (UnimplementedCallbackServer) Callback(req *CallbackRequestBuilder) (res *CallbackResponse, errRes router.ErrorResponse) {
|
||||
errRes = &ErrorHandler{router.DefaultErrorNotImplemented}
|
||||
func (u UnimplementedCallbackServer) Callback(req *CallbackRequestBuilder) (res *CallbackResponse, errRes router.ErrorResponse) {
|
||||
errRes = u.ErrorResponse(router.DefaultErrorNotImplemented)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -52,12 +52,14 @@ func (r TokenResponse) Response() router.Response {
|
||||
return &r
|
||||
}
|
||||
|
||||
type UnimplementedTokenServer struct{}
|
||||
type UnimplementedTokenServer struct {
|
||||
*ErrorHandler
|
||||
}
|
||||
|
||||
func (UnimplementedTokenServer) mustEmbedUnimplementedTokenServer() {}
|
||||
|
||||
func (UnimplementedTokenServer) Token(req *TokenRequestBuilder) (res *TokenResponse, errRes router.ErrorResponse) {
|
||||
errRes = &ErrorHandler{router.DefaultErrorNotImplemented}
|
||||
func (u UnimplementedTokenServer) Token(req *TokenRequestBuilder) (res *TokenResponse, errRes router.ErrorResponse) {
|
||||
errRes = u.ErrorResponse(router.DefaultErrorNotImplemented)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user