Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Edgar Rasquin 326 posts 925 karma points
    Jun 21, 2021 @ 09:10
    Edgar Rasquin
    0

    unhandled exception occurred

    Hi Matt,

    A customer reported, that he could not accomplish his order because of an error. I am getting this error in the log:

    {"@t":"2021-06-19T09:27:52.5002581Z","@mt":"An unhandled 
    exception occurred","@l":"Error","@x":"System.InvalidOperationException: 
    No order line found with the given ID\r\n   at  Vendr.Core.Models.Order.WithOrderLine(Guid orderLineId)\r\n   
    at     CampusShop.Core.Controllers.Surface.CartSurfaceController.UpdateCart(UpdateCartDto postModel) in 
    D:\\...\\Controllers\\Surface\\CartSurfac    eController.cs:line 77\r\n 
    

    Can you imagine what is wrong?

    Thanks,

    Edgar

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jun 21, 2021 @ 09:15
    Matt Brailsford
    0

    Hi Edgar,

    Not without seeing what is happening in your CartSurfaceController at line 77 😁

    Matt

  • Edgar Rasquin 326 posts 925 karma points
    Jun 21, 2021 @ 09:45
    Edgar Rasquin
    0

    Hi Mattt

    of course. I'm always following the Tutorial from Paul Seal (codeshare.co.uk):

    enter image description here

    Thanks

  • Edgar Rasquin 326 posts 925 karma points
    Jun 21, 2021 @ 09:54
    Edgar Rasquin
    0

    In the log I also often get this error:

    {"@t":"2021-06-19T18:46:17.5476189Z","@mt":"An unhandled exception occurred","@l":"Error","@x":"System.InvalidOperationException: Sequence contains no elements\r\n   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)\r\n   at ASP._Page_App_Plugins_VendrCheckout_Views_VendrCheckoutShippingMethodPage_cshtml.Execute() in C:\\...\\httpdocs\\App_Plugins\\VendrCheckout\\Views\\VendrCheckoutShippingMethodPage.cshtml:line 16\r\n
    
  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jun 21, 2021 @ 10:03
    Matt Brailsford
    0

    Ok, well it sounds like it's trying to update an order line that doesn't exist in the order.

    Unfortunately I can't tell from what you've posted why that would be. The errors are only telling you that it's trying to modify an order line that isn't there.

    You'll need to try and debug a little deeper as to why it's expected to be there, but it's actually not 🤔

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft