Skip to content

Commit 7f36f05

Browse files
committed
fix: improve error messages
1 parent f3816f0 commit 7f36f05

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/utils/data.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,16 @@ export async function selectProject(team) {
102102
productionBranch: productionBranch || defaultProductionBranch
103103
}
104104
}).catch((err) => {
105-
if (err.response?._data?.message?.includes('Cloudflare account')) {
105+
if (err.response?._data?.message?.includes('Cloudflare credentials')) {
106106
consola.warn('You need to link your Cloudflare account to create a project.')
107107
consola.info('Please configure it in your team settings:')
108108
consola.info(`\`${joinURL(NUXT_HUB_URL, team.slug, '/settings/cloudflare')}\`\n`)
109109
process.exit(1)
110110
}
111+
if (err.response?._data?.message?.includes('Cloudflare account')) {
112+
consola.error(err.response._data.message)
113+
process.exit(1)
114+
}
111115
throw err
112116
})
113117
consola.success(`Project ${colors.blue(project.slug)} created`)

0 commit comments

Comments
 (0)