Closed carere closed 3 years ago
With the latest version v4
the interface for HttpErrorEffect
changed:
Observable<{ error, request }>
-> Observable<{ status, body, headers, request }>
You didn't get the error because there is missing type assertion of HttpErrorEffect
interface to error$
:
which means:
const error$: HttpErrorEffect = req$ =>
req$.pipe(
map(({ request }) => ({
request,
status: HttpStatus.BAD_REQUEST,
body: 'Something'
}))
);
I noticed that documentation still uses old interface. Applied a fix πͺ
Ok thx for the answer, i understand now π
First of all, thx for this awesome package, i was looking for a small web framework (smaller than nest π ), and i found yours !!
Describe the bug As the title said, when i use error effect when configuring the server, it result with an error in case of an route not found.
To Reproduce All you need to do is to call http://127.0.0.1:1337/foo with the following script
Expected behavior I think it should work as expected when using specific error effect π
Desktop (please complete the following information):
Additional context I using MarbeJS with ReScript π . Since, i'm a big lover of RxJS, i would like to promote your framework in rescript community !!