Comments (7)
Server logs would contain a very specific message when authentication fails.
Since every response in theory has access to the HTTP context, changing the API to include it makes some sense.
How many changes this would require given a specific HTTP client, I cannot immediately tell.
from hop.
I'll give a try because it's easy to test, but more information would be welcome: Hop version, a code snippet to reproduce (to find out which HTTP layer is used). Without this it's difficult to diagnose the problem. Thanks.
from hop.
The (default) HttpClient
layer introduced in 4.0 would not handle errors properly for GET requests, I pushed a couple of changes to fix this. This is likely what you're were experiencing, but I'll wait your confirmation before releasing 4.1.
from hop.
Thanks for your reply and fixes. I'll get back to you next week.
from hop.
@acogoluegnes I've tested the authentication error and I can confirm that it's handled much better now.
I've also tested getting a non-existing queue and in this case I get null
in return. From your commit, I see that the 404 code is handled specifically to return null but I'm wondering why. As a user I would have found it more helpful to have the exception with the status code like the other codes.
from hop.
Thanks for testing.
Returning null
for non-existing resources is a historical design decision in Hop that was made before I started working on the library. Maybe @michaelklishin has more information about this.
I don't think it'll be easy to change this now, as it would be a significant breaking change.
from hop.
Ok I see, well it's not a big deal but something to be aware of to avoid NullPointerException
s.
from hop.
Related Issues (20)
- Handle "undefined" port value in channel details HOT 5
- Make channel details deserialization null-proof
- Bump dependencies
- Require at least Java 11 HOT 2
- Use Java 11 HttpClient for blocking IO client HOT 1
- Deprecate usage of RestTemplate HOT 1
- Bump dependencies
- Remove Groovy from runtime dependencies
- Bump dependencies
- Unable to configure TLS HOT 1
- Make JdkHttpClientHttpLayer public
- Make JdkHttpClientHttpLayer.Configuration#create() public
- Bump dependencies
- Add Getter for ExchangeInfo dto to access ExchangeMessageStats HOT 3
- Bump dependencies
- Bump dependencies
- createVhost(name) fails on some versions due to serialization error HOT 6
- Bump dependencies
- PUT /api/global-parameters/{name} HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hop.