RackHD/on-http

View on GitHub
data/views/error.2.0.json

Summary

Maintainability
Test Coverage
{
    "message": "<%=message%>",
    "status": "<%=status%>",
    "UUID": "<%=uuid%>"
    <% if (hasOwnProperty("errors")) { %>
    ,"errors": [
    <% errors.forEach(function ( item, i, arr){ %>
    "<%=item %>"
    <%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
    <% }); %>
    ]
    <% } %>
    <% if (hasOwnProperty("stack")) { %>
    ,"stack": [
    <% stack.forEach(function ( item, i, arr){ %>
    "<%=item %>"
    <%= ( arr.length > 0 && i < arr.length-1 ) ? ',': '' %>
    <% }); %>
    ]
    <% } %>
}