Skip to content

Commit

Permalink
updated api error message (#31009)
Browse files Browse the repository at this point in the history
### Packages impacted by this PR
`
@azure/microsoft-playwright-testing`


### Issues associated with this PR

Display informational messages to the user in case of errors during test
run.


### Describe the problem that is addressed by this PR


### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?


### Are there test cases added in this PR? _(If not, why?)_


### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
  • Loading branch information
kashish2508 authored Sep 6, 2024
1 parent 9281493 commit 7ec3f09
Showing 1 changed file with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,49 +106,49 @@ export class Constants {

public static readonly ERROR_MESSAGE: ApiErrorMessage = {
getTestRun: {
400: "Bad Request",
401: "Invalid authentication to run test.",
403: "You do not have required permissions to run test.",
400: "The request made to the server is invalid. Please check the request parameters and try again.",
401: "The authentication token provided is invalid. Please check the token and try again.",
403: "You do not have the required permissions to run tests. Please contact your workspace administrator.",
500: "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues.",
429: "You have exceeded the rate limit for the test run service API. Please wait and try again later",
504: "The request to the test run service timed out. Please try again later",
503: "The test run service is currently unavailable. Please check the service status and try again.",
429: "You have exceeded the rate limit for the API. Please wait and try again later.",
504: "The request to the service timed out. Please try again later.",
503: "The service is currently unavailable. Please check the service status and try again.",
},
patchTestRunShardStart: {
400: "Bad Request",
401: "Invalid authentication",
403: "You do not have required permissions.",
400: "The request made to the server is invalid. Please check the request parameters and try again.",
401: "The authentication token provided is invalid. Please check the token and try again.",
403: "You do not have the required permissions to run tests. Please contact your workspace administrator.",
500: "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues.",
429: "You have exceeded the rate limit for the est run shard start service API. Please wait and try again later",
504: "The request to the test run shard start service timed out. Please try again later",
503: "The test run shard start service is currently unavailable. Please check the service status and try again.",
429: "You have exceeded the rate limit for the API. Please wait and try again later.",
504: "The request to the service timed out. Please try again later.",
503: "The service is currently unavailable. Please check the service status and try again.",
},
patchTestRunShardEnd: {
400: "Bad Request",
401: "Invalid authentication",
403: "You do not have required permissions.",
400: "The request made to the server is invalid. Please check the request parameters and try again.",
401: "The authentication token provided is invalid. Please check the token and try again.",
403: "You do not have the required permissions to run tests. Please contact your workspace administrator.",
500: "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues.",
429: "You have exceeded the rate limit for the test run shard end service API. Please wait and try again later",
504: "The request to the test run shard end service timed out. Please try again later",
503: "The test run shard end service is currently unavailable. Please check the service status and try again.",
429: "You have exceeded the rate limit for the API. Please wait and try again later.",
504: "The request to the service timed out. Please try again later.",
503: "The service is currently unavailable. Please check the service status and try again.",
},
postTestResults: {
400: "Bad Request",
401: "Invalid authentication to publish test result.",
403: "You do not have required permissions to publish test results to the service. Please contact your workspace administrator.",
400: "The request made to the server is invalid. Please check the request parameters and try again.",
401: "The authentication token provided is invalid. Please check the token and try again.",
403: "You do not have the required permissions to run tests. Please contact your workspace administrator.",
500: "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues.",
429: "You have exceeded the rate limit for the publish test results service API. Please wait and try again later",
504: "The request to the publish test results service timed out. Please try again later",
503: "The publish test results service is currently unavailable. Please check the service status and try again.",
429: "You have exceeded the rate limit for the API. Please wait and try again later.",
504: "The request to the service timed out. Please try again later.",
503: "The service is currently unavailable. Please check the service status and try again.",
},
getStorageUri: {
400: "Bad Request",
401: "Invalid authentication",
403: "You do not have required permissions",
400: "The request made to the server is invalid. Please check the request parameters and try again.",
401: "The authentication token provided is invalid. Please check the token and try again.",
403: "You do not have the required permissions to run tests. Please contact your workspace administrator.",
500: "An unexpected error occurred on our server. Our team is working to resolve the issue. Please try again later, or contact support if the problem continues.",
429: "You have exceeded the rate limit for the get storage uri service API. Please wait and try again later",
504: "The request to the get storage uri service timed out. Please try again later",
503: "The get storage uri service is currently unavailable. Please check the service status and try again.",
429: "You have exceeded the rate limit for the API. Please wait and try again later.",
504: "The request to the service timed out. Please try again later.",
503: "The service is currently unavailable. Please check the service status and try again.",
},
};
}
Expand Down

0 comments on commit 7ec3f09

Please sign in to comment.