Newbie Spellweaver
- Joined
- Nov 25, 2017
- Messages
- 55
- Reaction score
- 7
seems like it will fix my logging issue know any solusions on removing the 404 error since it propley crashes VC
i had to figure out where the error handling of the 404 error whas but i figured out myself sothe issue is fixed:laugh:We can't know what your problem is here unless you elaborate or show us the problem in code. Either way, why do you think it's happening in the first place? Is there an error that you're not catching somewhere, do you not expect it to return 404 in the first place, is someone accessing a page they shouldn't be on your server, or...?
[COLOR=#D4D4D4][COLOR=#9cdcfe]app[/COLOR].[COLOR=#dcdcaa]use[/COLOR]([COLOR=#569cd6]function[/COLOR]([COLOR=#9cdcfe]req[/COLOR], [COLOR=#9cdcfe]res[/COLOR], [COLOR=#9cdcfe]next[/COLOR]) {
[COLOR=#dcdcaa]next[/COLOR]([COLOR=#dcdcaa]createError[/COLOR]([COLOR=#b5cea8]404[/COLOR])); // create a 404(Not Found) error
});
[/COLOR]
[COLOR=#D4D4D4][COLOR=#9cdcfe]app[/COLOR].[COLOR=#dcdcaa]use[/COLOR]([COLOR=#569cd6]function[/COLOR]([COLOR=#9cdcfe]req[/COLOR], [COLOR=#9cdcfe]res[/COLOR], [COLOR=#9cdcfe]next[/COLOR]) {
[COLOR=#dcdcaa]next[/COLOR]([COLOR=#dcdcaa]createError[/COLOR]([COLOR=#b5cea8]200[/COLOR])); // make that an 200(OK) Code
});
[/COLOR]
Why don't you just redirect * to a custom page instead of throwing an error?