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
|
return &r
|
||||||
}
|
}
|
||||||
|
|
||||||
type UnimplementedCallbackServer struct{}
|
type UnimplementedCallbackServer struct {
|
||||||
|
*ErrorHandler
|
||||||
|
}
|
||||||
|
|
||||||
func (UnimplementedCallbackServer) mustEmbedUnimplementedCallbackServer() {}
|
func (UnimplementedCallbackServer) mustEmbedUnimplementedCallbackServer() {}
|
||||||
|
|
||||||
func (UnimplementedCallbackServer) Callback(req *CallbackRequestBuilder) (res *CallbackResponse, errRes router.ErrorResponse) {
|
func (u UnimplementedCallbackServer) Callback(req *CallbackRequestBuilder) (res *CallbackResponse, errRes router.ErrorResponse) {
|
||||||
errRes = &ErrorHandler{router.DefaultErrorNotImplemented}
|
errRes = u.ErrorResponse(router.DefaultErrorNotImplemented)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,12 +52,14 @@ func (r TokenResponse) Response() router.Response {
|
|||||||
return &r
|
return &r
|
||||||
}
|
}
|
||||||
|
|
||||||
type UnimplementedTokenServer struct{}
|
type UnimplementedTokenServer struct {
|
||||||
|
*ErrorHandler
|
||||||
|
}
|
||||||
|
|
||||||
func (UnimplementedTokenServer) mustEmbedUnimplementedTokenServer() {}
|
func (UnimplementedTokenServer) mustEmbedUnimplementedTokenServer() {}
|
||||||
|
|
||||||
func (UnimplementedTokenServer) Token(req *TokenRequestBuilder) (res *TokenResponse, errRes router.ErrorResponse) {
|
func (u UnimplementedTokenServer) Token(req *TokenRequestBuilder) (res *TokenResponse, errRes router.ErrorResponse) {
|
||||||
errRes = &ErrorHandler{router.DefaultErrorNotImplemented}
|
errRes = u.ErrorResponse(router.DefaultErrorNotImplemented)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user