Skip to content

Commit

Permalink
Merge pull request #2193 from rainbowflesh/master
Browse files Browse the repository at this point in the history
fix github action missing env
  • Loading branch information
pan93412 committed Mar 5, 2024
2 parents dd8aa17 + da8afc1 commit 87ef48b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Expand Up @@ -81,6 +81,7 @@ jobs:
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1.6.0
env:
VUE_APP_NETEASE_API_URL: /api
VUE_APP_ELECTRON_API_URL: /api
VUE_APP_ELECTRON_API_URL_DEV: http://127.0.0.1:10754
VUE_APP_LASTFM_API_KEY: 09c55292403d961aa517ff7f5e8a3d9c
Expand Down
12 changes: 10 additions & 2 deletions src/utils/request.js
Expand Up @@ -57,8 +57,16 @@ service.interceptors.response.use(
},
async error => {
/** @type {import('axios').AxiosResponse | null} */
const response = error.response;
const data = response.data;
let response;
let data;
if (error === 'TypeError: baseURL is undefined') {
response = error;
data = error;
console.error("You must set up the baseURL in the service's config");
} else if (error.response) {
response = error.response;
data = response.data;
}

if (
response &&
Expand Down

0 comments on commit 87ef48b

Please sign in to comment.