[REST] item/bulk - response with error

  • sammlerkalle_dev

    19 mensajes

    Alemania

    Hello,

    after starting a bulk (e.g. 4) of items, and the data for every items is ok, I will get a response like this (shortened):

    < Headers >
    < Status >200< /Status >
    < /Headers >

    < body >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < /body >

    ---------------------

    If (in the same case) there is an error in the third item (invalid currency 'abc') and the other items are ok, there is a response like that:

    < Headers >
    < Status >500< /Status >
    < /Headers >

    < body >
    < error >err_item_incorrectCurrency< /error >
    < /body >

    With this I cannot see, which item was sent and which has an error. After a while (minutes or hours) I get the notification(s) which tell me, that three items are started. There is no chance to test with a script before the notification, which item ha the error. So I only can wait.

    ---------------------

    So I think, in the second case it would be better to return a response like this (shortened):

    < Headers >
    < Status >200< /Status >
    < /Headers >

    < body >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < item >< error >err_item_incorrectCurrency< /status >...< /item >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < /body >
  • Cuenta eliminada
    Cuenta eliminada

    0 mensajes

    Bélgica

    Hello,

    after starting a bulk (e.g. 4) of items, and the data for every items is ok, I will get a response like this (shortened):

    < Headers >
    < Status >200< /Status >
    < /Headers >

    < body >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < /body >

    ---------------------

    If (in the same case) there is an error in the third item (invalid currency 'abc') and the other items are ok, there is a response like that:

    < Headers >
    < Status >500< /Status >
    < /Headers >

    < body >
    < error >err_item_incorrectCurrency< /error >
    < /body >

    With this I cannot see, which item was sent and which has an error. After a while (minutes or hours) I get the notification(s) which tell me, that three items are started. There is no chance to test with a script before the notification, which item ha the error. So I only can wait.

    ---------------------

    So I think, in the second case it would be better to return a response like this (shortened):

    < Headers >
    < Status >200< /Status >
    < /Headers >

    < body >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < item >< error >err_item_incorrectCurrency< /status >...< /item >
    < item >< status >Your request was taken into account!< /status >...< /item >
    < /body >
    • Creado 10 may 2012 a 9:10
    • #385399
    Los datos ya no están disponibles porque la cuenta de este usuario ha sido eliminada (Reglamento RGPD)
  • sammlerkalle_dev

    19 mensajes

    Alemania

    Los datos ya no están disponibles porque la cuenta de este usuario ha sido eliminada (Reglamento RGPD)
    • Creado 11 may 2012 a 7:31
    • #385513
    Thanks! :cool:
  • Cuenta eliminada
    Cuenta eliminada

    0 mensajes

    Bélgica

    Thanks! :cool:
    • Creado 11 may 2012 a 8:52
    • #385524
    Los datos ya no están disponibles porque la cuenta de este usuario ha sido eliminada (Reglamento RGPD)
  • sammlerkalle_dev

    19 mensajes

    Alemania

    Los datos ya no están disponibles porque la cuenta de este usuario ha sido eliminada (Reglamento RGPD)
    • Creado 18 may 2012 a 3:09
    • #386422
    The HTTP-Status-Code in this case is 206 (Partial Content), and it works fine. Thank you.