[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-active
Subject:    Re: Review Request 110892: Bodega-server: Add more error messages when an asset is failed to be purc
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2013-06-13 13:43:25
Message-ID: 20130613134325.2976.81568 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110892/#review34296
-----------------------------------------------------------



server/lib/db/purchaseAsset.js
<http://git.reviewboard.kde.org/r/110892/#comment25180>

    this could be a switch statement ..



server/lib/db/purchaseAsset.js
<http://git.reviewboard.kde.org/r/110892/#comment25181>

    just return a Database error in this case; since the user is authenticated we \
know they exist, so the only way we can get back error code 2 is if the database has \
failed us.



server/lib/errors.js
<http://git.reviewboard.kde.org/r/110892/#comment25179>

    this should be put up with the generic errors as this should also get used in the \
assetinfo.js file. perhaps put it after InvalidEmailAddress with id 1001



server/lib/errors.js
<http://git.reviewboard.kde.org/r/110892/#comment25178>

    since the user is authenticated, this can't happen



server/lib/errors.js
<http://git.reviewboard.kde.org/r/110892/#comment25177>

    this is already covered by "PurchaseNotEnoughPoints": 26


- Aaron J. Seigo


On June 13, 2013, 1:35 p.m., Antonis Tsiapaliokas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110892/
> -----------------------------------------------------------
> 
> (Updated June 13, 2013, 1:35 p.m.)
> 
> 
> Review request for Bodega.
> 
> 
> Description
> -------
> 
> Hello,
> 
> With this patch, we will be able to know more information about why an asset has \
> being failed to purchased. 
> 
> Diffs
> -----
> 
> server/lib/db/purchaseAsset.js b01a652 
> server/lib/errors.js 27fe443 
> 
> Diff: http://git.reviewboard.kde.org/r/110892/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Antonis Tsiapaliokas
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/110892/">http://git.reviewboard.kde.org/r/110892/</a>
  </td>
    </tr>
   </table>
   <br />











<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="http://git.reviewboard.kde.org/r/110892/diff/2/?file=149866#file149866line40" \
style="color: black; font-weight: bold; text-decoration: \
underline;">server/lib/db/purchaseAsset.js</a>  <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">40</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">                 <span \
class="k">if</span> <span class="p">(</span><span class="nx">ret</span> <span \
class="o"><span class="hl">&gt;</span></span><span class="hl"> </span><span \
class="mi"><span class="hl">0</span></span><span class="p">)</span> <span \
class="p">{</span></pre></td>  <th bgcolor="#e9eaa8" style="border-left: 1px solid \
#C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">40</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">                 <span class="k">if</span> <span \
class="p">(</span><span class="nx">ret</span> <span class="o"><span \
class="hl">===</span></span><span class="hl"> </span><span class="mi"><span \
class="hl">1</span></span><span class="p">)</span> <span \
class="p">{</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">this could \
be a switch statement ..</pre> </div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="http://git.reviewboard.kde.org/r/110892/diff/2/?file=149866#file149866line44" \
style="color: black; font-weight: bold; text-decoration: \
underline;">server/lib/db/purchaseAsset.js</a>  <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">44</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">              \
<span class="nx">errors</span><span class="p">.</span><span \
class="nx">report</span><span class="p">(</span><span \
class="s1">&#39;InvalidUser&#39;</span><span class="p">,</span> <span \
class="nx">req</span><span class="p">,</span> <span class="nx">res</span><span \
class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">just return \
a Database error in this case; since the user is authenticated we know they exist, so \
the only way we can get back error code 2 is if the database has failed us.</pre> \
</div> <br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="http://git.reviewboard.kde.org/r/110892/diff/2/?file=149867#file149867line93" \
style="color: black; font-weight: bold; text-decoration: \
underline;">server/lib/errors.js</a>  <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">93</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="s2">&quot;InvalidAsset&quot;</span>           <span class="o">:</span> <span \
class="mi">66</span><span class="p">,</span><span class="c1">//The asset doesn&#39;t \
exist in this store</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">this should \
be put up with the generic errors as this should also get used in the assetinfo.js \
file. perhaps put it after InvalidEmailAddress with id 1001</pre> </div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="http://git.reviewboard.kde.org/r/110892/diff/2/?file=149867#file149867line94" \
style="color: black; font-weight: bold; text-decoration: \
underline;">server/lib/errors.js</a>  <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">94</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="s2">&quot;InvalidUser&quot;</span>            <span class="o">:</span> <span \
class="mi">67</span><span class="p">,</span><span class="c1">//The user cannot be \
found in that store</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">since the \
user is authenticated, this can&#39;t happen</pre> </div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="http://git.reviewboard.kde.org/r/110892/diff/2/?file=149867#file149867line95" \
style="color: black; font-weight: bold; text-decoration: \
underline;">server/lib/errors.js</a>  <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">95</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="s2">&quot;NotEnoughPoints&quot;</span>        <span class="o">:</span> <span \
class="mi">68</span> <span class="c1">//You don&#39;t have enough point to purchase \
the asset</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">this is \
already covered by &quot;PurchaseNotEnoughPoints&quot;: 26</pre> </div>
<br />



<p>- Aaron J.</p>


<br />
<p>On June 13th, 2013, 1:35 p.m. UTC, Antonis Tsiapaliokas wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Bodega.</div>
<div>By Antonis Tsiapaliokas.</div>


<p style="color: grey;"><i>Updated June 13, 2013, 1:35 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Hello,

With this patch, we will be able to know more information about why an asset has \
being failed to purchased.</pre>  </td>
 </tr>
</table>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>server/lib/db/purchaseAsset.js <span style="color: grey">(b01a652)</span></li>

 <li>server/lib/errors.js <span style="color: grey">(27fe443)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/110892/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
Active mailing list
Active@kde.org
https://mail.kde.org/mailman/listinfo/active


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic