Skip to content

Commit 85159e4

Browse files
authored
fix: only print status message when explicitly provided in Actor.exit() (#203)
1 parent 08db28b commit 85159e4

File tree

4 files changed

+35
-40
lines changed

4 files changed

+35
-40
lines changed

CODEOWNERS

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
# See: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
33

44
# To keep eye on new functions added to Actor specification
5-
/packages/apify/src/ @jancurn
6-
/packages/apify/src/ @mnmkng
5+
/packages/apify/src/ @jancurn @mnmkng

packages/apify/src/actor.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,10 @@ export class Actor<Data extends Dictionary = Dictionary> {
248248
finished = true;
249249
}
250250

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

257-
await this.setStatusMessage(options.statusMessage, { isStatusMessageTerminal: true, level: options.exitCode > 0 ? LogLevel.ERROR : LogLevel.INFO });
258-
259255
if (!options.exit) {
260256
return;
261257
}

website/package-lock.json

+19-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,30 @@
1515
"devDependencies": {
1616
"@apify/eslint-config-ts": "^0.3.0",
1717
"@apify/tsconfig": "^0.1.0",
18-
"@types/react": "^17.0.39",
19-
"@typescript-eslint/eslint-plugin": "^5.13.0",
20-
"@typescript-eslint/parser": "^5.13.0",
21-
"eslint": "^8.10.0",
22-
"eslint-plugin-react": "^7.29.3",
23-
"eslint-plugin-react-hooks": "^4.3.0",
24-
"fs-extra": "^11.0.0",
18+
"@types/react": "^18.2.8",
19+
"@typescript-eslint/eslint-plugin": "^5.59.9",
20+
"@typescript-eslint/parser": "^5.59.9",
21+
"eslint": "^8.42.0",
22+
"eslint-plugin-react": "^7.32.2",
23+
"eslint-plugin-react-hooks": "^4.6.0",
24+
"fs-extra": "^11.1.1",
2525
"got": "^11.8.2",
2626
"path-browserify": "^1.0.1",
27-
"prettier": "^2.5.1",
27+
"prettier": "^2.8.8",
2828
"rimraf": "^5.0.0"
2929
},
3030
"dependencies": {
31-
"@apify/docs-theme": "^1.0.78",
32-
"@docusaurus/core": "^2.3.0",
33-
"@docusaurus/plugin-client-redirects": "^2.3.0",
34-
"@docusaurus/preset-classic": "^2.3.0",
31+
"@apify/docs-theme": "^1.0.85",
32+
"@docusaurus/core": "^2.4.1",
33+
"@docusaurus/plugin-client-redirects": "^2.4.1",
34+
"@docusaurus/preset-classic": "^2.4.1",
3535
"clsx": "^1.2.1",
3636
"docusaurus-gtm-plugin": "^0.0.2",
3737
"docusaurus-plugin-typedoc-api": "^3.0.0",
3838
"prop-types": "^15.8.1",
3939
"raw-loader": "^4.0.2",
4040
"react": "^17.0.2",
4141
"react-dom": "^17.0.2",
42-
"unist-util-visit": "^4.1.1"
42+
"unist-util-visit": "^4.1.2"
4343
}
4444
}

0 commit comments

Comments
 (0)