Skip to content

Commit

Permalink
fix: only print status message when explicitly provided in `Actor.exi…
Browse files Browse the repository at this point in the history
…t()` (#203)
  • Loading branch information
B4nan committed Jun 9, 2023
1 parent 08db28b commit 85159e4
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 40 deletions.
3 changes: 1 addition & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -2,5 +2,4 @@
# See: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners

# To keep eye on new functions added to Actor specification
/packages/apify/src/ @jancurn
/packages/apify/src/ @mnmkng
/packages/apify/src/ @jancurn @mnmkng
8 changes: 2 additions & 6 deletions packages/apify/src/actor.ts
Expand Up @@ -248,14 +248,10 @@ export class Actor<Data extends Dictionary = Dictionary> {
finished = true;
}

if (options.exitCode > 0) {
options.statusMessage ??= `Actor finished with an error (exit code ${options.exitCode})`;
} else {
options.statusMessage ??= `Actor finished successfully (exit code ${options.exitCode})`;
if (options.statusMessage != null) {
await this.setStatusMessage(options.statusMessage, { isStatusMessageTerminal: true, level: options.exitCode > 0 ? LogLevel.ERROR : LogLevel.INFO });
}

await this.setStatusMessage(options.statusMessage, { isStatusMessageTerminal: true, level: options.exitCode > 0 ? LogLevel.ERROR : LogLevel.INFO });

if (!options.exit) {
return;
}
Expand Down
38 changes: 19 additions & 19 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions website/package.json
Expand Up @@ -15,30 +15,30 @@
"devDependencies": {
"@apify/eslint-config-ts": "^0.3.0",
"@apify/tsconfig": "^0.1.0",
"@types/react": "^17.0.39",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"eslint": "^8.10.0",
"eslint-plugin-react": "^7.29.3",
"eslint-plugin-react-hooks": "^4.3.0",
"fs-extra": "^11.0.0",
"@types/react": "^18.2.8",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"eslint": "^8.42.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"fs-extra": "^11.1.1",
"got": "^11.8.2",
"path-browserify": "^1.0.1",
"prettier": "^2.5.1",
"prettier": "^2.8.8",
"rimraf": "^5.0.0"
},
"dependencies": {
"@apify/docs-theme": "^1.0.78",
"@docusaurus/core": "^2.3.0",
"@docusaurus/plugin-client-redirects": "^2.3.0",
"@docusaurus/preset-classic": "^2.3.0",
"@apify/docs-theme": "^1.0.85",
"@docusaurus/core": "^2.4.1",
"@docusaurus/plugin-client-redirects": "^2.4.1",
"@docusaurus/preset-classic": "^2.4.1",
"clsx": "^1.2.1",
"docusaurus-gtm-plugin": "^0.0.2",
"docusaurus-plugin-typedoc-api": "^3.0.0",
"prop-types": "^15.8.1",
"raw-loader": "^4.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"unist-util-visit": "^4.1.1"
"unist-util-visit": "^4.1.2"
}
}

0 comments on commit 85159e4

Please sign in to comment.