Skip to content

airframe-http: Propagate RPCException during parsing RPC requests #2794

Merged
xerial merged 2 commits intomasterfrom
rpc-validation
Mar 21, 2023
Merged

airframe-http: Propagate RPCException during parsing RPC requests #2794
xerial merged 2 commits intomasterfrom
rpc-validation

Conversation

@xerial
Copy link
Copy Markdown
Member

@xerial xerial commented Mar 17, 2023

Closes #2773

@xerial xerial marked this pull request as ready for review March 18, 2023 01:30
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 18, 2023

Codecov Report

Merging #2794 (9938f91) into master (ce7926e) will increase coverage by 0.01%.
The diff coverage is 95.65%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2794      +/-   ##
==========================================
+ Coverage   82.27%   82.28%   +0.01%     
==========================================
  Files         337      337              
  Lines       14175    14184       +9     
  Branches     2332     2313      -19     
==========================================
+ Hits        11662    11672      +10     
+ Misses       2513     2512       -1     
Impacted Files Coverage Δ
...wvlet/airframe/http/router/HttpRequestMapper.scala 94.84% <95.65%> (+0.28%) ⬆️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce7926e...9938f91. Read the comment docs.

@xerial xerial added the breaking Breaking changes label Mar 18, 2023
@xerial xerial changed the title airframe-http: Propagate RPCException when parsing requests airframe-http: Propagate RPCException during parsing RPC requests Mar 18, 2023
@xerial
Copy link
Copy Markdown
Member Author

xerial commented Mar 19, 2023

@takezoe With this change, we can add validation code inside RPC request objects

)
methodArgs.toSeq
} catch {
case e: IllegalArgumentException =>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

* Converting the input MessagePack into an object. If the conversion fails, throw an IllegalArgumentException

Copy link
Copy Markdown
Member

@takezoe takezoe left a comment

Choose a reason for hiding this comment

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

Thank you!

@xerial xerial merged commit 593bc08 into master Mar 21, 2023
@xerial xerial deleted the rpc-validation branch March 21, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

airframe-http: Return RPCException when method parameter mapping fails

2 participants