}
private requestListener (req: IncomingMessage, res: ServerResponse): void {
- this.authenticate(req, (err) => {
+ this.authenticate(req, err => {
if (err != null) {
res
.writeHead(StatusCodes.UNAUTHORIZED, {
throw new BaseError(`Unsupported UI protocol version: '${fullProtocol}'`)
}
this.registerProtocolVersionUIService(version)
- req.on('error', (error) => {
+ req.on('error', error => {
logger.error(
`${this.logPrefix(moduleName, 'requestListener.req.onerror')} Error on HTTP request:`,
error
const body = JSON.parse(Buffer.concat(bodyBuffer).toString()) as RequestPayload
this.uiServices
.get(version)
- ?.requestHandler(
- this.buildProtocolRequest(
- uuid,
- procedureName,
- body ?? Constants.EMPTY_FROZEN_OBJECT
- )
- )
+ ?.requestHandler(this.buildProtocolRequest(uuid, procedureName, body))
.then((protocolResponse?: ProtocolResponse) => {
if (protocolResponse != null) {
this.sendResponse(protocolResponse)