Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Production Search API Fails #234

Open
pbennett87 opened this issue Jan 14, 2025 · 4 comments
Open

Production Search API Fails #234

pbennett87 opened this issue Jan 14, 2025 · 4 comments

Comments

@pbennett87
Copy link

For some reason in the production build my search feature has stopped working

@pbennett87
Copy link
Author

It might be worth noting that the /dist/ folder has simply been uploaded to a simple http server, everything else works fine, just not the search, the console log states the following when typing a search term.

TypeError: Cannot read properties of undefined (reading 'body')
at sw_helpers.js:303:28

querySkySources: function (str, limit) {
    if (!limit) {
      limit = 10
    }
    return fetch(process.env.VUE_APP_NOCTUASKY_API_SERVER + '/api/v1/skysources/?q=' + str + '&limit=' + limit)
      .then(function (response) {
        if (!response.ok) {
          throw response.body
        }
        return response.json()
      }, err => {
        throw err.response.body
      })
  },

@pbennett87
Copy link
Author

I even hardcoded the api

querySkySources: function (str, limit) {
    if (!limit) {
      limit = 10
    }
    return fetch('https://api.noctuasky.com/api/v1/skysources/?q=' + str + '&limit=' + limit)
      .then(function (response) {
        if (!response.ok) {
          throw response.body
        }
        return response.json()
      }, err => {
        throw err.response.body
      })
  },

@gzotti gzotti marked this as a duplicate of #237 Jan 22, 2025
@kantn8r
Copy link

kantn8r commented Jan 23, 2025

Occasionally the search feature stops working and this has happened again for me today. I do not normally report this since it's typically resolved quickly. It's been a few hours now and the search feature is still not working.

@kantn8r
Copy link

kantn8r commented Jan 24, 2025

The search feature is working again this morning. It did not work at all yesterday. I'm am using an old PC, mainly to retain the use of AutoCAD 2014. Today you have to rent it for $100/month.

Computer: Dell XPS 8300 i7-2600
OS: Windows 7 Home Premium 64-bit
Browser: Chrome Version 109.0.5414.120 (Official Build) (64-bit)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants