Magento2 Invalid return error when uploading VCL snippets to Fastly

Comments

4 comments

  • Trin

    Hi Chris! I don't see anything wrong with the VCL snippets, but from past tickets we've seen this error reported when the wrong subroutine is chosen -- ie. vcl_error instead of vcl_recv.

    Could you please check to see that the VCL snippets are in the correct subroutines?

    Also, I'm happy to take a deeper look into your configuration to see if there are any other factors contributing to the error you see. Let me know if that's something you require, and I can open a ticket from this post. Also feel free to open a ticket with support@fastly.com any time.

     

    0
    Comment actions Permalink
  • Chris Lohman

    Hey Trin - thanks for the quick response.  Currently, here are some screen shots of the types.  They are correctly assigned to recv and error types.  I have many other snippets too.  I had the following thought, however this seems very unlikely to me, but is it possible that I'm not allowed to call error from multiple recv snippets?  I have one other recv snippet that is doing some geoip redirecting for continental Europe that has no issues whatsoever when saving.

     

    0
    Comment actions Permalink
  • Trin

    Thanks for checking! I think this requires a deeper look into your configuration, so I've created a ticket from this post. Please check your inbox for an email from support@fastly.com. Once resolved we can post the solution here for visibility.

    0
    Comment actions Permalink
  • Trin

    As a follow-up, we determined that the error was due to this snippet not being added to the vcl_recv subroutine:

    if (req.http.host == "www.shop.example.com") {
    error 619 "Redirect www.shop";
    }
    0
    Comment actions Permalink

Please sign in to leave a comment.