Skip to content

Conversation

@montyanderson
Copy link
Member

This change adds the following features:

  • ability to get either an ArrayBuffer or a Uint8Array response for developer ease
  • ProdiaCapacityError gives a more descriptive error asking you to check your token & job type
  • ProdiaBadResponseError shows the raw response text to give you more information e.g. "invalid token"
  • last item in state history is checked for failure error messages

This change adds the following tests:

  • a bad job config must return a ProdiaUserError referencing that the json schema validation failed, the name of the field, and the criteria for it's failure (i.e. beyond a maximum)
  • a bad job type returns a ProdiaCapacityError. we plan on changing this in the future but the current correct response is a 429 ProdiaCapacityError
  • a bad token must return a ProdiaBadResponseError referencing "invalid token"
  • image/png accept type must return a real png image

This change adds the following features:
* ability to get either an `ArrayBuffer` or a `Uint8Array` response for developer ease
* `ProdiaCapacityError` gives a more descriptive error asking you to check your token & job type
* `ProdiaBadResponseError` shows the raw response text to give you more information e.g. "invalid token"
* last item in state history is checked for failure error messages

This change adds the following tests:

* a bad job config must return a `ProdiaUserError` referencing that the json schema validation failed, the name of the field, and the criteria for it's failure (i.e. beyond a maximum)
* a bad job type returns a `ProdiaCapacityError`. we plan on changing this in the future but the current correct response is a 429 `ProdiaCapacityError`
* a bad token must return a `ProdiaBadResponseError` referencing "invalid token"
* `image/png` accept type must return a real png image
@montyanderson montyanderson merged commit 7b98eb0 into master Jan 29, 2025
8 checks passed
@montyanderson montyanderson deleted the error-handling-tests branch January 29, 2025 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants