moleculer icon indicating copy to clipboard operation
moleculer copied to clipboard

errorHandler in moleculer.config.js

Open HaiBien opened this issue 3 years ago • 4 comments

#moleculer.config.js

"use strict"; module.exports = { errorHandler: null, }

I want to know how errorHandler is used? I have seen the document (https://moleculer.services/docs/0.14/broker.html#Global-error-handler) but it doesn't help

HaiBien avatar Aug 05 '22 07:08 HaiBien

What exactly do you expect here?

Could you write more detail? Cos that I saw you set errorHandler is null,

lucwj avatar Aug 05 '22 07:08 lucwj

@lucduong e chào a ạ. em đang muốn bắt một số lỗi và custom lại nó. Em đọc trên docs thì thấy có errorHandler xử lý lỗi, mà e chưa biết phải sử dụng nó như thế nào ạ.

ảnh lỗi muốn custom: https://prnt.sc/dZBte7wiuh7a

image

HaiBien avatar Aug 05 '22 07:08 HaiBien

For 404 handler in moleculer-web see this example

intech avatar Aug 05 '22 08:08 intech

For 404 handler in moleculer-web see this example

This works perfectly. Thanks

HaiBien avatar Aug 05 '22 09:08 HaiBien