Skip to content

Add missing raise_for_status() error handling on AS4 submission#18

Merged
arj03 merged 2 commits intoiterasdev:masterfrom
raphaelm:error-handling
Feb 27, 2026
Merged

Add missing raise_for_status() error handling on AS4 submission#18
arj03 merged 2 commits intoiterasdev:masterfrom
raphaelm:error-handling

Conversation

@raphaelm
Copy link
Copy Markdown
Collaborator

No description provided.

@arj03
Copy link
Copy Markdown
Collaborator

arj03 commented Feb 27, 2026

Hmm, that doesn't look correct. The logic is a bit tricky here, but it appears that if you get not 200, then futher down it tries to make a proper error out of it. With this raise it will bubble up the HTTPError and not give you a sendpeppol error?

@raphaelm
Copy link
Copy Markdown
Collaborator Author

Hm, you're right, it breaks logic down below, I didn't look far enough. The problem I was running into was a Peppol AP that returned an error 500 with no body, therefore breaking the etree.fromstring() line in a way that said "empty body", which feld less helpful in logs than "error 500"

@raphaelm
Copy link
Copy Markdown
Collaborator Author

New attempt pushed

Copy link
Copy Markdown
Collaborator

@arj03 arj03 left a comment

Choose a reason for hiding this comment

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

Thanks

@arj03 arj03 merged commit 9d1737f into iterasdev:master Feb 27, 2026
2 checks passed
@raphaelm raphaelm deleted the error-handling branch February 27, 2026 11:01
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.

2 participants