Missing handler for http service (WrongHttpServiceHandler)¶
Type | Scope | Severity | Activated by default |
Minutes to fix |
Tags |
---|---|---|---|---|---|
Error |
BSL |
Critical |
Yes |
10 |
suspicious error |
Description¶
If there is no http-service method handler, then the call to the operation will return neither data, nor errors on the client side of the service, nor errors on the side of the service itself.
Important: the http service method should only accept one parameter.
The configurator notices violations only when the "Check for the existence of assigned handlers" flag is enabled.
Examples¶
Invalid handler method with empty body
Function StorageGETRequest(Request)
EndFunction
Correct handler method - only one parameter is specified and there is a method body
Function StorageGETRequest(Request)
Return ModuleRequests.Get(Request);
EndFunction
Invalid handler method with the wrong number of parameters
Function StorageGETRequest(Request, Additional)
Return ModuleRequests.Get(Request);
EndFunction
Sources¶
- Developers guide 8.3.20. Internet service mechanisms (RU)
- Configuration guidelines. Web services and HTTP services (RU)
Snippets¶
Diagnostic ignorance in code¶
// BSLLS:WrongHttpServiceHandler-off
// BSLLS:WrongHttpServiceHandler-on
Parameter for config¶
"WrongHttpServiceHandler": false