Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
毕凯
2016-06-21 00:07:25 +0800
Commit
1ba4a8a7432cbfd85ec5768675cf10546d864a8b
1 parent
13aff759
错误中间件修改
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
doraemon/middleware/error-handler.js
doraemon/middleware/error-handler.js
View file @
1ba4a8a
...
...
@@ -32,8 +32,8 @@ exports.notFound = () => {
*/
exports
.
serverError
=
()
=>
{
return
(
err
,
req
,
res
,
next
)
=>
{
logger
.
error
(
err
);
if
(
!
res
.
headersSent
)
{
logger
.
error
(
err
);
if
(
req
.
xhr
)
{
return
res
.
status
(
500
).
json
({
code
:
500
,
...
...
Please
register
or
login
to post a comment