jenkins-bot has submitted this change and it was merged.

Change subject: Fix error response codes
......................................................................


Fix error response codes

 * DoesNotExistError should return a 404.

Change-Id: Ic9c8bc92790947cc365cb3b5e73980daa9198853
---
M api/routes.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/api/routes.js b/api/routes.js
index e465252..213db5b 100644
--- a/api/routes.js
+++ b/api/routes.js
@@ -388,7 +388,7 @@
                if ( !env.responseSent ) {
                        return new Promise(function( resolve, reject ) {
                                apiUtils.setHeader( res, env, 'Content-Type', 
'text/plain; charset=UTF-8' );
-                               apiUtils.sendResponse( res, env, 
logData.fullMsg(), logData.code || 500 );
+                               apiUtils.sendResponse( res, env, 
logData.fullMsg(), logData.flatLogObject().code || 500 );
                                res.on( 'finish', resolve );
                        }).catch(function(e) {
                                console.error( e.stack || e );

-- 
To view, visit https://gerrit.wikimedia.org/r/173084
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9c8bc92790947cc365cb3b5e73980daa9198853
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Marcoil <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to