MongoDB.live, free & fully virtual. June 9th - 10th. Register Now MongoDB.live, free & fully virtual. June 9th - 10th. Register Now

MDBW19 Eliot's Weekly Challenge #5 - JAMStack

Hi All,

RE: https://mdbwchallengeweek5.splashthat.com/

I’m going through Eliot’s challenges from last year’s MDBW and I’m stuck on connecting my JS app to Stitch. It’s calling out to Stitch but receiving 404 not found with an error in the call stack

function not found: 'find' at e._Error (https://s3.amazonaws.com/stitch-sdks/js/bundles/4.3.1/stitch.js:1:121318)

It doesn’t mention to create a function in the stitch app but the failure is happening at POST to this endpoint. https://us-east-1.aws.stitch.mongodb.com/api/client/v2.0/app/stitch-app-id(removed)/functions/call

This is from the logs on Stitch.

Error:
function not found: 'find'
Stack Trace:
StitchError: function not found: 'find'
{
  "arguments": [
    {
      "collection": "listingsAndReviews",
      "database": "sample_airbnb",
      "query": {
        "address.country": "United States",
        "beds": {
          "$eq": {
            "$numberInt": "1"
          }
        },
        "bathrooms": {
          "$eq": {
            "$numberInt": "1"
          }
        },
        "property_type": "Apartment"
      },
      "limit": {
        "$numberInt": "25"
      }
    }
  ],
  "name": "find",
  "service": "weekly-challenge-5"
}

finally figured it out. My MDB_SERVICE name was incorrect. When I linked the cluster, I changed the name of it from the default.

1 Like

@jeremyfiel Thanks for following up with the fix for the error you encountered. Were you able to complete the first four challenges without any issues?

The Weekly Challenges for MDBW19 are almost a year old, so there may be a few UI differences in screenshots. The challenges should still be solvable, but please start a new discussion topic in the forum or comment on the relevant solution blog post if any details need to be updated.

Regards,
Stennie

1 Like

Hey Stennie

I just finished up the Jamstack challenge only because it caught my eye as I was reading other JAM related stuff. Eventually, I will try all of the other challenges. Thanks for your reply