Closed hyang691 closed 1 month ago
Hi @hyang691 Usually 401/403 is error code and shall throw error for SDK users. Could you try to add @error
for the Error
like ?:
@error
model Error {
@statusCode statusCode:
| 403
| 401;
id: string;
/** The code of the error. */
code: string;
/** The message in case of a blocking error in calculation. */
message: string;
/** The status of the error. */
status?: string;
};
it works, thanks.
Thank @msyyc for your great support, look forward the latest version. :)
After discussion, Python team thinks your tsp doesn't follow API design principal so it is better to update the tsp. It shall be OK if you change model ErrorResponse
to alias ErrorResponse
like:
alias ErrorResponse = {
id: string;
/** The code of the error. */
code: string;
/** The message in case of a blocking error in calculation. */
message: string;
/** The status of the error. */
status?: string;
};
@error
model Error {
@statusCode statusCode:
| 403
| 500
| 401;
...ErrorResponse;
};
I will take an investigation asap