[REST] item/bulk - response with error

  • sammlerkalle_dev

    19 messages

    Allemagne

    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 >
  • Compte supprimé
    Compte supprimé

    0 message

    Belgique

    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 >
    • Posté le 10 mai 2012 à 09:10
    • #385399
    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
  • sammlerkalle_dev

    19 messages

    Allemagne

    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
    • Posté le 11 mai 2012 à 07:31
    • #385513
    Thanks! :cool:
  • Compte supprimé
    Compte supprimé

    0 message

    Belgique

    Thanks! :cool:
    • Posté le 11 mai 2012 à 08:52
    • #385524
    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
  • sammlerkalle_dev

    19 messages

    Allemagne

    Les informations ne sont plus disponibles car le compte de cet utilisateur est supprimé (Règlement RGPD)
    • Posté le 18 mai 2012 à 03:09
    • #386422
    The HTTP-Status-Code in this case is 206 (Partial Content), and it works fine. Thank you.