Dynamic error messages

未關閉
#14,692 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
18/100
Issue 類型
功能
描述清晰度
需要釐清
活躍度
活躍
技術堆疊
java
領域
api, backend

研究方向

The issue proposes extending ACS exceptions such as CloudRuntimeException with optional multi-message constructors, then choosing the message in API responses by the caller's Role type. Start by reading how CloudRuntimeException is defined and how API error responses are built from it, and note that the role check has no defined design yet. Done means maintainers have agreed on the exception and role-based message design, and only then should code change.

由索引模型根據 Issue 內容生成。

描述

The required feature described as a wish

As a Admin I would like to have more informative error messages. Meanwhile, I do not want the end-users to receive too much information about the system or infrastructure. It would be interesting to have a way so that the APIs return different errors depending on my Role type.

Without putting too much thought into it, we could extend the ACS exceptions, like the CloudRuntimeException, to have optional constructors with multiple messages, and when returning those messages in the API response we would check for the Role type and send the correct message.

主要語言
Java
星號
3.1k
分支
1.4k
平均合併
7 天 16 小時
30 天內合併 PR
15

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

apache/cloudstack 的其他 Issue

查看 apache/cloudstack 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。