Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add handling for empty error object in deploy.ts #3

Merged
merged 4 commits into from
Jun 22, 2024

Conversation

Gabulhas
Copy link
Contributor

@Gabulhas Gabulhas commented Jun 8, 2024

Super simple, but was facing some problems here for example

https://ao_marton.g8way.io/#/message/K5bEfUQh6Cc_bnyf41uJi8eWGfAJ6G5w2-LW-oij7Rk

where the deployment was getting an empty "Error" attribute, like the following:

{
  "Messages": [],
  "Assignments": [],
  "Spawns": [],
  "Output": "",
  "Error": {}      <-- It was breaking because of this
} 

@pawanpaudel93
Copy link
Owner

@Gabulhas Thanks for the PR. Can you please run pnpm lint --fix and push the changes ?

src/lib/deploy.ts Outdated Show resolved Hide resolved
- Convert error to string if it's an object using JSON.stringify()
- Use String() for other data types
- Simplify error check to handle various data types
@pawanpaudel93 pawanpaudel93 merged commit 239207f into pawanpaudel93:main Jun 22, 2024
@pawanpaudel93
Copy link
Owner

@Gabulhas Thanks for the PR. Its merged and new version is published.

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

Successfully merging this pull request may close these issues.

None yet

2 participants