[
https://issues.apache.org/jira/browse/BEAM-13357?focusedWorklogId=690083&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-690083
]
ASF GitHub Bot logged work on BEAM-13357:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Dec/21 15:10
Start Date: 03/Dec/21 15:10
Worklog Time Spent: 10m
Work Description: AydarZaynutdinov commented on a change in pull request
#16123:
URL: https://github.com/apache/beam/pull/16123#discussion_r762016992
##########
File path: playground/backend/internal/errors/grpc_errors_test.go
##########
@@ -22,21 +22,28 @@ import (
func TestInternalError(t *testing.T) {
type args struct {
- title string
- message string
+ title string
+ formatMessage string
+ arg interface{}
}
tests := []struct {
name string
args args
expected string
wantErr bool
}{
- {name: "TestInternalError", args: args{title: "TEST_TITLE",
message: "TEST_MESSAGE"},
- expected: "rpc error: code = Internal desc =
TEST_TITLE: TEST_MESSAGE", wantErr: true},
+ {
+ // Test case with calling InternalError method.
+ // As a result, want to receive error with correct
error message.
+ name: "TestInternalError",
Review comment:
Added tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 690083)
Time Spent: 40m (was: 0.5h)
> [Playground] Update custom errors
> ---------------------------------
>
> Key: BEAM-13357
> URL: https://issues.apache.org/jira/browse/BEAM-13357
> Project: Beam
> Issue Type: Improvement
> Components: beam-playground
> Reporter: Aydar Zaynutdinov
> Assignee: Aydar Zaynutdinov
> Priority: P3
> Labels: beam-playground-backend
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Now custom errors require 2 string parameters. Need update it to use a format
> string:
> errors.NotFoundError(stringTitle, stringMessageWithPlaceholders,
> placeholders...)
> Also need to change using of all custom errors (now it uses fmt.Sprintf() or
> string concatenation)
--
This message was sent by Atlassian Jira
(v8.20.1#820001)