Skip to content

Commit

Permalink
refactor: use messages for text
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Nov 9, 2023
1 parent 6deabcd commit 3c9c73d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
10 changes: 10 additions & 0 deletions messages/org.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,13 @@ We found more than one SandboxProcess with the SandboxName %s.
# sandboxNotResumable

The sandbox %s cannot resume with status of %s.

# UnexpectedResponse

Unexpected response from the platform

# UnexpectedResponse.actions

- Check that the instance URL is correct and the org still exists.

See what's at the URL that's causing the problem: %s.
10 changes: 1 addition & 9 deletions src/org/org.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,15 +705,7 @@ export class Org extends AsyncOptionalCreatable<Org.Options> {
// an html error page like https://computing-connect-6970-dev-ed.scratch.my.salesforce.com/services/data/v50.0
// where the message is an entire html page
if (e instanceof Error && (e.name.includes('ERROR_HTTP') || e.message.includes('<html '))) {
throw new SfError(
'Unexpected response from the platform',
'UnexpectedResponse',
[
'Check that the instance URL is correct and the org still exists.',
`See what's at the URL that's causing the problem: ${conn.baseUrl()}`,
],
e
);
throw messages.createError('UnexpectedResponse', [], [conn.baseUrl()], e);
}
throw e;
}
Expand Down

3 comments on commit 3c9c73d

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger Benchmarks - ubuntu-latest

Benchmark suite Current: 3c9c73d Previous: 6deabcd Ratio
Child logger creation 480719 ops/sec (±0.45%) 296910 ops/sec (±11.44%) 0.62
Logging a string on root logger 796183 ops/sec (±7.84%) 554513 ops/sec (±8.82%) 0.70
Logging an object on root logger 641942 ops/sec (±7.51%) 391193 ops/sec (±14.82%) 0.61
Logging an object with a message on root logger 6007 ops/sec (±212.70%) 263703 ops/sec (±14.40%) 43.90
Logging an object with a redacted prop on root logger 455906 ops/sec (±7.35%) 276074 ops/sec (±16.37%) 0.61
Logging a nested 3-level object on root logger 389850 ops/sec (±7.23%) 1139 ops/sec (±276.37%) 0.0029216365268693086

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Logger Benchmarks - ubuntu-latest'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 3c9c73d Previous: 6deabcd Ratio
Logging an object with a message on root logger 6007 ops/sec (±212.70%) 263703 ops/sec (±14.40%) 43.90

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger Benchmarks - windows-latest

Benchmark suite Current: 3c9c73d Previous: 6deabcd Ratio
Child logger creation 349164 ops/sec (±0.33%) 313520 ops/sec (±0.80%) 0.90
Logging a string on root logger 841907 ops/sec (±9.94%) 712419 ops/sec (±5.79%) 0.85
Logging an object on root logger 495433 ops/sec (±7.89%) 576034 ops/sec (±9.04%) 1.16
Logging an object with a message on root logger 13296 ops/sec (±187.05%) 11843 ops/sec (±189.20%) 0.89
Logging an object with a redacted prop on root logger 397143 ops/sec (±9.03%) 455969 ops/sec (±6.60%) 1.15
Logging a nested 3-level object on root logger 293738 ops/sec (±5.51%) 321664 ops/sec (±6.18%) 1.10

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.