You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexey Kuznetsov (JIRA)" <ji...@apache.org> on 2016/01/13 17:09:40 UTC

[jira] [Updated] (IGNITE-2373) Revisit server side error handling logic

     [ https://issues.apache.org/jira/browse/IGNITE-2373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Kuznetsov updated IGNITE-2373:
-------------------------------------
    Description: 
We have in /routes 14 times
{code}
send(err) 
{code}
and  27 times
{code}
 send(err.message)
{code}

It seems for me that we should always use send(err) 

And also I think we could introduce a couple of utility functions to reduce boilerplate code like this
{code}
if (err)
  return res.status(500).send(err.message);
{code}

  was:
We have in /routes 14 times
{code}
send(err) 
{code}
and  27 times
{code}
 send(err.message)
{code}

It seems for me that we should always use send(err) 

And also I think we could introduce a couple of utility functions to reduce boilerplate code like this
{code}
        if (err)
            return res.status(500).send(err.message);
{code}


> Revisit server side error handling logic
> ----------------------------------------
>
>                 Key: IGNITE-2373
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2373
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: wizards
>    Affects Versions: 1.5
>            Reporter: Alexey Kuznetsov
>            Assignee: Andrey Novikov
>             Fix For: 1.6
>
>
> We have in /routes 14 times
> {code}
> send(err) 
> {code}
> and  27 times
> {code}
>  send(err.message)
> {code}
> It seems for me that we should always use send(err) 
> And also I think we could introduce a couple of utility functions to reduce boilerplate code like this
> {code}
> if (err)
>   return res.status(500).send(err.message);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)